今天在云服务器上部署MVC项目爆出 HTTP错误 403.14-Forbidden,最终在网上找到解决方案,具体步骤以下:web
1.webconfig中添加:服务器
<system.webServer>
<validationvalidateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true" />less
</system.webServer>post
在web.config增长<modules runAllManagedModulesForAllRequests="true" />spa
若是还不行,请检查一下“处理程序映射”,里面是否有“ExtensionlessUrlHandler-Integrated-4.0”,若是没有,请注册.net4.0.net
在运行里输入:C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i (个人缘由主要就是这个!)blog
2.继续爆出以下错误:部署
Compiler Error Message: CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\xx' -- 'Access is denied.
最后给 "C:\Windows\Temp"文件夹加上 IIS_IUSRS的权限就行了。
it