因为我已经浪费了5天来解决这个问题与.cshtml asp.net网页我想为什么不问大师。
HTTP错误404.4 - 未找到您要查找的资源没有与之关联的处理程序。详细错误信息模块IIS Web核心通知MapRequestHandler处理程序尚未确定错误代码0x80070002请求的URL xxxxxxxxx:80 / bakery / default.cshtml物理路径xxxxxxxx \ bakery \ default.cshtml登录方法匿名登录用户匿名
<system.webServer>
<security>
<requestFiltering>
<fileExtensions>
<remove fileExtension=".cshtml" />
<add fileExtension=".cshtml" allowed="true" />
</fileExtensions>
</requestFiltering>
</security>
<validation validateIntegratedModeConfiguration="true" />
<modules runAllManagedModulesForAllRequests="true" />
<handlers accessPolicy="Read, Script, Write, Execute">
<clear />
<remove name="cshtml-Integrated-4.0" />
<remove name="cshtm-Integrated-4.0" />
<remove name="cshtml-ISAPI-4.0_32bit" />
<remove name="cshtml-ISAPI-4.0_64bit" />
<add name="cshtml-ISAPI-4.0_32bit" path="*.cshtml" verb="GET,HEAD,POST,DEBUG" resourceType="Unspecified" requireAccess="Script" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
<add name="cshtml-ISAPI-4.0_64bit" path="*.cshtml" verb="GET,HEAD,POST,DEBUG" resourceType="Unspecified" requireAccess="Script" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
</handlers>
</system.webServer>
记录:是的.NET 4.0安装,这是一个明显的要求,因为这个应用程序的应用程序池设置为“允许32位应用程序”,应用程序池设置为在集成模式下运行。 server:windows server 2008 r2,从上面可以看到runAllManagedModulesForAllRequests =“true”设置为true。所以请不要问我这些愚蠢的问题,那些做过任何故障排除的人都已经做过了。
我遇到了同样的问题,我使用的是虚拟主机服务器,我通过将所有MVC3和Razor dll复制到bin文件夹来解决了这个问题。