MVC4发布到IIS,出现HTTP 错误 404.0 - Not Found的解决方法

时间:2023-03-08 18:36:59

MVC4发布到IIS,出现HTTP 错误 404.0 - Not Found的解决方法

1.出现的错误页面

MVC4发布到IIS,出现HTTP 错误 404.0 - Not Found的解决方法

2.定位原因,因为web.config中有配置4.5而实际服务器只装了4.0,导致没有办法解析。出现上述错误

MVC4发布到IIS,出现HTTP 错误 404.0 - Not Found的解决方法

3.解决办法

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

重新启动网站,回收,再次查看,就可以运行了。