這兩天一直在弄IIS的事,全都是報錯,網上找了好多資料,也嘗試了很多,終於在幾分鍾之前把困擾了我一周的麻煩給解決了,現整理出來,希望對大家有用,閑話少說,直接上圖了
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\Framework\v4.0.30319\Temporary ASP.NET Files\root\21a2b314\31512cd\App_Web_login.aspx.cdcab7d2.mfr3xa-z.dll' -- '拒絕訪問。 '
Source Error
在網上找了好多的資料,整理出來,有以下5種:
1、Cleaned the "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files" folder
刪除上述文件夾中的臨時文件,再重啟IIS。這也是一種辦法,但沒有能解決我機子的問題;

2、Gave Full permissions to IIS_IUSRS group
給物理路徑的文件夾賦予IIS_IUSER的完全權限。這個辦法,嘗試了還是沒有解決;
3、Gave Full permissions to "Everyone"
再賦予EVERYONE的完全權限,結果還是沒用;
4、Ran the following command too: %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis -i
在運行里重新注冊一下NET4.0,直接把路徑拖到運行窗口,按空格后輸入-i,回車執行。一般問題到這里也就解決了,可我這問題依舊存在,郁悶!
5、C:\Windows\Temp"文件夾加上 IIS_IUSRS的權限
給TEMP文件夾加上IIS_IUSER后問題居然解決了!
,這么簡單,嚇我一跳!
