Win7下部署 .NET MVC网站 之 HTTP错误 403.14-Forbidden 解决方法

时间:2023-03-09 19:24:03
Win7下部署 .NET MVC网站 之 HTTP错误 403.14-Forbidden 解决方法

今天在 IIS 7 发布MVC 站点时 遇到 ”HTTP错误 403.14-Forbidden Web 服务器被配置为不列出此目录的内容 “ 的错误提示。

一番折腾后发现在web.config 中加入下面的代码即可:

<system.webServer>
  <modules runAllManagedModulesForAllRequests="true" />
</system.webServer>