当前位置首页 > IIS知识

ASP.NET4.5MVC4无法在Windows2008的IIS7.0上解决方案

阅读次数:219 次  来源:admin  发布时间:

VS2012开发的MVC4调试的时候一切正常,放在Win2008的IIS7.0上死活不能运行

提示

----------------------------------------------

HTTP 错误 403.14 - Forbidde

Web 服务器被配置为不列出此目录的内容。

ASP.NET 4.5 MVC 4 无法在Windows2008的IIS7.0上解决方案

----------------------------------------------

访问http://localhost:8080/home/index提示

----------------------------------------------

HTTP 错误 404.0 - Not Found

您要找的资源已被删除、已更名或暂时不可用。

ASP.NET 4.5 MVC 4 无法在Windows2008的IIS7.0上解决方案

----------------------------------------------

但是这台服务器运行VS2010开发的MVC3没有问题

最后Google找到如下设置,可以解决这个问题

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

相关文章:

http://stackoverflow.com/questions/11425574/mvc4-http-error-403-14-forbidde

http://stackoverflow.com/questions/12495346/asp-net-4-5-mvc-4-not-working-on-windows-server-2008-iis-7

文章也推荐了相关补丁 但是我机器不能安装(同样不知道为啥)

上一篇:Ubuntu下Apache2的CGI简单配置
下一篇:Fedora安装过程中的一些问题-RunGump