CS0016错误解决汇编

1.第一种情况:

Server Error in '/' Application.


Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\4866c718\20ba01f4\App_global.asax.4omftjrn.dll' -- '拒绝访问。 '

解决方法:

    Cleaned the "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files" folder
    Gave Full permissions to IIS_IUSRS group
    Gave Full permissions to "Everone"
    Ran the following command too: %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis -i

郁闷的是都没能解决我的问题,最后给 "C:\Windows\Temp"文件夹加上 IIS_IUSRS的权限就好了。

2.第二种情况:

CS0016: Could not write to output file 'c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.net Files\ ....拒绝访问

查了一圈,发现是IIS在运行时编译时,首先将网站所需要的dll文件拷进c:\Windows\temp(或Tmp)文件中,然后再拷进'c:\WINDOWS\Microsoft.Net\Framework\v4.0.30319\Temporary ASP.NET Files\下面。这个问题:当前用户没有写入temp的权限。
解决方法

简单两步:

c:\Windows\temp 加入NetWork Service 和IIS_UserName的写入权限

c:\Windows\Tmp 加入NetWork Service 和IIS_UserName的写入权限




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值