asp.net mvc4 HTTP Error 403.14

asp.net mvc4项目部署到II&上时,出现
HTTP Error 403.14 - Forbidden - The Web server is configured to not list the contents of this directory.
在web.config的system.webServer节点中
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
如果这个modules不存在,那么加上就好了。原因是Nuget有时会删除这个节点。
参见http://stackoverflow.com/questions/1741439/asp-mvc-in-iis-7-results-in-http-error-403-14-forbidden

posted @ 2014-01-22 14:32  瓜王  阅读(4722)  评论(1编辑  收藏  举报