Compiler Error Message: CS0016: Could not write to output

打开网页是报错:

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:WindowsMicrosoft.NETFramework64v4.0.30319Temporary ASP.NET Files ootd08c021e3b2d272fApp_GlobalResources.3fyayowo.dll' -- '拒绝访问。 '

Source Error:

 
[No relevant source lines]


Source File:    Line: 0 





Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34280

  解决办法:

  1、错误原因:Users 用户对 C:Windows 目录下的 temp 文件夹没有修改,当 .net 需要向 temp 文件夹写临时文件时,因无权限写入而产生异常。

  2、解决办法:只需向 C:Windows 目录下的 temp 文件夹添加 Users 用户并分配“修改”权限;如果 temp 文件夹已经有 Users 用户,勾选“修改”权限即可。

  方法如下:

  A、右键 temp 文件夹,选择“属性” → “安全”选项卡 → 编辑

  B、选中 Users 用户,勾选“修改”,单击“确定”即可。

  C、如果 Users 用户不在“组或用户名”中,单击“添加” → 高级 → 立即查找 → 双击“搜索结果”中的 Users 用户 → 确定。

原文地址:https://www.cnblogs.com/sunbingqiang/p/7065183.html