Monday, May 2, 2011

Error : Directory Listing Denied This Virtual Directory does not allow contents to be listed.

This is a common Error frequented by many of us when we try to configure the IIS to work for our websites. This error indicates that the IIS could not locate the intial load document of your website or web application. This is generally due to our oversight while configuring IIS.
By default, the following documents are listed in IIS.

  • Default.asp
  • Default.htm
  • index.htm
  • iisstart.asp
To fix this error, we need to follow the following steps.
1. Open IIS via Control Panel or by entering "inetmgr" at run(Start).
2. Open your Computer details(default local Computer)
3. Expand "Web Sites" -> "Default Web Site"
4. Locate your project folder under this and right-click and select properties
5. Locate the "Documents" tab under these properties.
6. Under the "Enable Default Document" section, press the ADD button.
7. In the new pop-up window enter the name of your startup document with its extension.(Login.aspx)
8. Select the newly added value in Default Document section and set it priority level by using the arrows on the left side on the window.
9. Press the OK button and refresh IIS.
10. Right click your project and select browse.

Congratulations, your website works.


No comments:

Post a Comment