ASP.NET HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory

24,947

Solution 1

  • Method 1: Enable the Directory Browsing feature in IIS (Recommended)

To resolve this problem, follow these steps:

  1. Start IIS Manager. To do this, click Start, click Run, type inetmgr.exe, and then click OK.
  2. In IIS Manager, expand server name, expand Web sites, and then click the website that you want to modify.
  3. In the Features view, double-click Directory Browsing.
  4. In the Actions pane, click Enable.

  • Method 2: Add a default document

To resolve this problem, follow these steps:

  1. Start IIS Manager. To do this, click Start, click Run, type inetmgr.exe, and then click OK.
  2. In IIS Manager, expand server name, expand Web sites, and then click the website that you want to modify.
  3. In the Features view, double-click Default Document.
  4. In the Actions pane, click Enable.
  5. In the File Name box, type the name of the default document, and then click OK.

  • Method 3: Enable the Directory Browsing feature in IIS Express

Note This method is for the web developers who experience the issue when they use IIS Express.

To do this, follow these steps:

  1. Open a command prompt, and then go to the IIS Express folder on your computer. For example, go to the following folder in a command prompt: C:\Program Files\IIS Express

  2. Type the following command, and then press Enter:

appcmd set config /section:directoryBrowse /enabled:true

Solution 2

I use IIS express for my web application but none of the above solutions worked for me. I added the following lines to the web.config file and it solved the problem.

  <system.webServer>
    <directoryBrowse enabled="true" />
  </system.webServer>

Solution 3

If your Solution having more than one project then set one of them as a Startup project by clicking option on that project you wish to make it startup project, then rebuild and run your solution Ienter image description here hope now it will work fine.

Share:
24,947
user3577397
Author by

user3577397

Updated on July 06, 2022

Comments

  • user3577397
    user3577397 almost 2 years

    I know there have been threads made on this very topic before, but I've scoured the internet finding posts on this site and others trying to solve my problem, but nothing has helped.

    I keep getting this error. Other posts have said to use the IIS manager. Which I did. I was tasked to add the application. I followed these directions, however, there's NO "Directory Browsing."

    I should probably note that I'm using Visual Studios by running Windows 7 with VMWare. I have a MacBook Air.

    Please help. I'm going nuts trying to figure this out. I'm trying to learn this stuff but it's difficult with these errors that keep popping up. I wonder if incompatibility with my system is an issue.

    1.Open up IIS Manager.

    2.Add the website by right clicking on "Default website" and choose "Add application".

    3.Enter any name as alias type and the load that website in the physical path and click OK.

    4.Then go to the Features View of that Loaded Website and double click on the "Directory Browsing".

    Click on "Actions" work space and change the "Disable" state to "Enable" state.
    

    6.Then Refresh the Default Website.

    7.Open the Visual Studio and go to that website. it will ask for reload , then click "yes".

    8.it will add the following code in the web.config file.

    <directoryBrowse enabled="true" />

    9.Now run and see the error will disappear.

    • Nilay Vishwakarma
      Nilay Vishwakarma about 7 years
      Please resolve this question by marking the valid answer
  • Overlord
    Overlord over 8 years
    Method 3 worked like a charm for me. Just don't forget spaces before slashes (/)