Troubleshooting IIS 7.5 on Window 7

I’ve just installed IIS 7.5 on a machine with Windows 7. Of course the website I deployed didn’t work on the first attempt, here’s a few steps to fix the missing (or wrong) settings on the webserver. Before starting ensure the url you enter on the browser points to the deployed website. Main things to check :

  • The host file under C:WindowsSystem32driversetc  should have an entry for the website deployed.

host file

  • Assign the same url to the host name of your website under IIS.

host name
* Ensure you enter the site url including the port, es

Once all the correct urls are been set on both iis and the host file, try access the site.

The same website working perfectly within the Visual Studio webserver, now on IIS, returns this error when trying to browse it:

HTTP Error 500.19 – Internal Server Error

Description: The requested page cannot be accessed because the related configuration data for the page is invalid.

Odd because the web.config haven’t changed. To fix it edit the applicationHost.config in the c:Windowssystem32inetsrvconfig folder  by changing the following key values:

  • <section name="handlers" overrideModeDefault="Deny" />
  • <section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
For both the key change from Deny to Allow.
Another error you can get is :
HTTP Error 401.3 – Unauthorized: Access is denied due to an ACL set on the requested resource
Before assigning full persmissions to the user "Everyone" over your folders, check that the anonymous user is enabled for the site:
anonymous user
Even if enabled , check that the anonymous identity is assigned to the App pool instead than a specific user (right click anonymous authentication->Edit->Application Pool Identity).
anonymous application pool
At this point one of the last issues can be not be allowed to browse the site content : HTTP Error 403.14 – Forbidden  The Web server is configured to not list the contents of this directory.
On IIS, go to the Directory Browsing feature (next to the Authentication one) and enable browsing:
enable browsing
If you still can’t reach the website and you got a listing of the files instead of the home page, try registering the framework  , this because IIS have been installed after the framework.

No Comments

You can leave the first : )

Leave a Reply

Your email address will not be published. Required fields are marked *