I have an Asp.Net MVC 2 web application deployed on IIS 7.5 on .Net 4.0. When I select application pool as Asp.Net v4.0 Classic I get the following error.
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
The same application works fine when I select application pool as Asp.Net v4.0 Integrated. Does anyone know what is the reason for this?
Update: I followed the steps from the folowing url.
http://www.asp.net/mvc/tutorials/using-asp-net-mvc-with-different-versions-of-iis-cs
I have added a map for .mvc extension and also modified the Routing as shown below.
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}.mvc/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
routes.MapRoute(
"Root",
"",
new { controller = "Home", action = "Index", id = "" }
Now the following url is working fine and I can see the Home/Index page.
http://myapp/home.mvc
But this still gives the same error (HTTP Error 403.14 - Forbidden)
http://myapp/
This should have worked since I have mapped the Root to Home/Index action.