Directory listing denied on ASP.Net MVC 4 app running in IIS 6 Virtual Directory

余生长醉 提交于 2019-12-03 11:47:35
Indomitable

I had faced the same problem and it got cleared when I added "Wildcard application mapping" (.*) to aspnet_isapi.dll with unchecked option "Verify that file exists"

Application -> Properties -> Directory -> Configuration -> Mappings -> Insert -> Browse to C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll -> Uncheck "Verify that file exists" -> Ok

Now the site is opening fine without any issues.

Similar issue: We installed MVC4 on an IIS6 box, set up everything as described, and got same error:

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

For us, the final fix was to add the UrlRoutingModule to the web.config:

  <add name="UrlRoutingModule"
       type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

Which makes sense, but I don't know why we needed to explicitly add it and others didn't. (We are running in a directory under Sharepoint, maybe related...)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!