.net web程序发布之后,出现编译错误

.net web程序发布之后,在IIS上浏览的时候出现编译错误。

CS0016: 未能写入输出文件“c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\web\4b49f661\23a749fc\******.cdcab7d2.zii776dc.dll”--“拒绝访问。 ”  

网上解决方案:

Grant full control to two users of your system “Network Service” and “YourComputerName\IIS_IUSERS” on the following folders. 
1. C:\Windows\Temp 
2. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files 
3. Restart IIS and try run your web application again.  

个人解决方案:

1.对C:\Windows\Temp 中的Users 赋予完全权限。

2.重启IIS并运行web程序即可。

posted @ 2014-12-12 11:08  点点_滴滴  阅读(220)  评论(0编辑  收藏  举报