今天在阿里雲虛擬機上部署新站點后出現下面的錯誤:
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. '
找遍了網上的資料最后總結為以下幾步::
- 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的權限就好了。