IIS出现Server Error in '/' Application.CS0016的解决办法


这两天一直在弄IIS的事,全都是报错,网上找了好多资料,也尝试了很多,终于在几分钟之前把困扰了我一周的麻烦给解决了,现整理出来,希望对大家有用,闲话少说,直接上图了IIS出现Server <wbr>Error <wbr>in <wbr>'/' <wbr>Application.CS0016的解决办法

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。这也是一种办法,但没有能解决我机子的问题;IIS出现Server <wbr>Error <wbr>in <wbr>'/' <wbr>Application.CS0016的解决办法 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后问题居然解决了!IIS出现Server <wbr>Error <wbr>in <wbr>'/' <wbr>Application.CS0016的解决办法,这么简单,吓我一跳!