What is the reason for the error page I get when I run my webapp in Visual Studio. The URL is http://localhost:5000/ HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory.
2 Answers
Reason: http://localhost:5000 refers to the root of the webserver. So, for the above request, it tries to read the root folder of the server. However, IIS (express) by default doesn't allow you to view the file system. Therefore it shows above error.
Most probably you don't need to access the root of the server, instead you might need to access your webapp (ex: http://localhost:5000/myapp).
However, if you know exactly what you are doing then you can enable IIS to show the root directory (file system) using the following config in the Web.config of your application
Important: Below config should not be activated in a production or any publicly reachable environment which is obviously a high critical security issue.
<system.webServer>
<directoryBrowse enabled="true" />
<modules runAllManagedModulesForAllRequests="true"></modules>
</system.webServer>

- 1,891
- 2
- 17
- 22
Two things are usually the issue when I get this error:
1st: I never defined a standard document and changed it at some point - therefore the standard document that is automatically defined by the IIS in this case, doesn't exist
2nd: I didn't enable index search
You might want to try this. You can change those settings in the IIS settings directly.

- 501
- 4
- 20