首页 > 其他分享 >解决:CS0016: 未能写入输出文件

解决:CS0016: 未能写入输出文件

时间:2022-11-10 21:08:04浏览次数:48  
标签:输出 assembly WINDOWS 写入 System Microsoft v4.0 NET CS0016


显示的错误信息如下

---------------------------

“/”应用程序中的服务器错误。

编译错误


说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。


编译器错误消息: CS0016: 未能写入输出文件“c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\App_global.asax.ekn_lljx.dll”--“拒绝访问。 ”


源错误:



 


[没有相关的源行]


源文件:    行: 0




显示详细的编译器输出:




c:\windows\system32\inetsrv> "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\d33a9c14\c8ed93c6_2e8ecc01\Rattan.DLL" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\d1e684d3\b8db6fc1_2e8ecc01\OpenExcel.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\dad7609d\7059f32e_5929cc01\Newtonsoft.Json.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Routing\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Routing.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\27705152\b0c15fcd_1b72cc01\log4net.DLL" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Mvc\v4.0_3.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\a465917c\00a92e6b_2cddca01\Microsoft.Practices.ServiceLocation.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\82a080cd\0014c09b_27ddca01\Microsoft.Practices.Unity.DLL" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\15246d08\d0e8fec1_2e8ecc01\DocumentFormat.OpenXml.Extensions.DLL" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Helpers\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.Helpers.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\aa0b8bcb\72457dc2_2e8ecc01\Rattan.Basic.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\af6dccc7\c08a9fc1_2e8ecc01\Lib.DBUtility.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\8de47505\ca7027c2_2e8ecc01\Rattan.Interface.BPS.DLL" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\617e362f\0014c09b_27ddca01\Microsoft.Practices.Unity.Configuration.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\9cc677dc\981fb1c0_2e8ecc01\Lib.Utility.DLL" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\4332598d\42b2f2c4_2e8ecc01\Rattan.OA.DLL" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\e3724d77\7e625dc3_2e8ecc01\Rattan.Core.DLL" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\a8d96de9\245abdc5_2e8ecc01\Rattan.BPS.DLL" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\2a982d48\3e4442c4_2e8ecc01\Rattan.Demo.DLL" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Deployment\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.Deployment.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Abstractions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Abstractions.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\assembly\dl3\4c80704f\00f6cb27_4c0bcc01\Microsoft.Web.Mvc.DLL" /out:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\App_global.asax.ekn_lljx.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701 /warnaserror- "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\App_global.asax.ekn_lljx.0.cs" "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\App_global.asax.ekn_lljx.1.cs"Microsoft(R) Visual C# 2010 编译器 4.0.30319.1 版版权所有(C) Microsoft Corporation。保留所有权利。error CS0016: 未能写入输出文件“c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5909b0ab\6a97ecae\App_global.asax.ekn_lljx.dll”--“拒绝访问。 ”





版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.225

 

解决方案:

  1 设置C:\windows\temp目录访问权限 temp--> 属性-->安全-- > 添加network service-->并赋予其权限为读和写--> 确定

  (注意:操作系统为windows server2003 framework 版本在 1.1及以上)

  2 设置发布网站的程序目录中bin文件夹的权限 同样添加 network service 并设置权限为读取、 运行。

标签:输出,assembly,WINDOWS,写入,System,Microsoft,v4.0,NET,CS0016
From: https://blog.51cto.com/xxjjing/5842077

相关文章