mvc项目在IIS访问出现404 - web240/web240.github.io GitHub Wiki

##一、解决方案一 在MVC根目录的web.config中添加

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

##二、解决方案二(推荐) 在cmd下,运行以下两个命令,重新注册IIS.

C:\Users\Administrator>cd C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\

aspnet_regiis -i