发布mvc遇到的HTTP错误 403.14-Forbidden解决办法

 

今天在云服务器上部署MVC项目爆出 HTTP错误 403.14-Forbidden,最终在网上找到解决方案,具体步骤如下:

1.webconfig中添加:

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

</system.webServer>

在web.config增加<modules runAllManagedModulesForAllRequests="true" />

如果还不行,请检查一下“处理程序映射”,里面是否有“ExtensionlessUrlHandler-Integrated-4.0”,如果没有,请注册.net4.0

在运行里输入:C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i  (我的原因主要就是这个!)

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的权限就好了。

 

 

posted @ 2017-06-07 17:44  zfybky  阅读(6887)  评论(0编辑  收藏  举报