$ cat "

Checklist for Solving the Directory Listing Denied Error after Deploying an ASP.NET MVC Application


More often than not after deploying a new ASP.NET MVC application for the first time I get an error message from IIS telling me that directory listing is not allowed. This error appears since IIS does not now what to do when you do a request for the root of the application and there is no default document, such as index.htm, so it tries to list the contents of the root directory. This, however is usually not permitted by the server, and there is your error.

The cause of the error might be one of any number of things. Here is a quick little checklist of things that I have found to be common causes:

* Make sure that the server is running the version of the .NET Framework which your application is targeting
* Make sure that the application is running in an application pool using the correct version of the .NET Framework and is running in integrated mode
* Try to include the <modules runAllManagedModulesForAllRequests="true" /> element in the WebServer section of your Web.config

Written by Erik Öjebo 2013-12-28 12:44