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

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。