一、遇到问题:
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:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\8840e6da\b373126a\App_Web_defaultwsdlhelpgenerator.aspx.cdcab7d2.xtd6mhdp.dll' -- 'Access is denied. '

Source Error:

 

[No relevant source lines]
 
二、环境:
win2003
iss6

二、解决办法:
给以下两个目录添加NetWork Service用户的所有权限
c:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
C:\Windows\Temp

三、比较隐晦的是:
在提示信息中只提示到了Temporary ASP.NET Files文件夹,给该文件夹加NetWork Service权限并不能解决问题
只有给C:\Windows\Temp也增加NetWork Service用户权限

四、出现此问题的可能原因:
用第三方临时文件清除工具后,可能会删除掉C:\Windows\Temp,造成失去了相应权限