CS0016: 未能写入(A compilation error has occurred.HttpCompileException: error CS0016: Could not write to
2015-07-15 17:48
459 查看
转自VC错误:http://www.vcerror.com/?p=1689
问题描述:
项目部署一直挺好的,今天使用时,突然在日记中报错!
System.UnauthorizedAccessException: Access to the temp directory is denied. Identity 'IIS APPPOOL\zbs_Remoter_20104' under which XmlSerializer is running does not have sufficient permission to access the temp directory. CodeDom will use the user account
the process is using to do the compilation, so if the user doesn�t have access to system temp directory, you will not be able to compile. Use Path.GetTempPath() API to find out the temp directory location.
Server stack trace:
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
在浏览器中,页面返回如下错误信息:
error CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\62dbbf01\a08ea1a8\App_global.asax.qujxfrcb.dll' -- '拒绝访问。 ' at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) at System.Web.Compilation.BuildManager.CompileGlobalAsax() at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() at System.Web.Compilation.BuildManager.CallAppInitializeMethod()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
……………………
at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) at System.Web.Compilation.BuildManager.CompileGlobalAsax()
at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() at System.Web.Compilation.BuildManager.CallAppInitializeMethod() at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
很是奇怪,竟然提示:
CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\62dbbf01\a08ea1a8\App_global.asax.qujxfrcb.dll' -- '拒绝访问。 '
解决方法:
具体的解决方法参考文章:http://www.vcerror.com/?p=1689
问题描述:
项目部署一直挺好的,今天使用时,突然在日记中报错!
System.UnauthorizedAccessException: Access to the temp directory is denied. Identity 'IIS APPPOOL\zbs_Remoter_20104' under which XmlSerializer is running does not have sufficient permission to access the temp directory. CodeDom will use the user account
the process is using to do the compilation, so if the user doesn�t have access to system temp directory, you will not be able to compile. Use Path.GetTempPath() API to find out the temp directory location.
Server stack trace:
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
在浏览器中,页面返回如下错误信息:
error CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\62dbbf01\a08ea1a8\App_global.asax.qujxfrcb.dll' -- '拒绝访问。 ' at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) at System.Web.Compilation.BuildManager.CompileGlobalAsax() at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() at System.Web.Compilation.BuildManager.CallAppInitializeMethod()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
……………………
at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) at System.Web.Compilation.BuildManager.CompileGlobalAsax()
at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() at System.Web.Compilation.BuildManager.CallAppInitializeMethod() at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
很是奇怪,竟然提示:
CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\62dbbf01\a08ea1a8\App_global.asax.qujxfrcb.dll' -- '拒绝访问。 '
解决方法:
具体的解决方法参考文章:http://www.vcerror.com/?p=1689
相关文章推荐
- libevent源码分析
- android-HttpClient上传信息(包括图片)到服务端
- Android访问网络,使用HttpURLConnection还是HttpClient?
- cocos2d-x学习篇之网络(http)篇
- android-HttpClient上传信息(包括图片)到服务端
- Android HttpURLConnection源码分析
- jboss eap开启https协议
- HTTP 错误 500.24 - Internal Server Error的解决方法
- CentOS下配置HTTPS访问主机并绑定访问端口号
- CentOS下配置HTTPS访问主机并绑定访问端口号
- http 响应头里面Content-Length字段详解
- Android OkHttp的Cookie自动化管理
- XMLHttpRequest对象的属性和方法
- 云计算和大数据时代网络技术揭秘(六)LISP协议
- 云计算和大数据时代网络技术揭秘(五)可靠的网络
- 探秘TCP数据包中的PSH标志
- 如何正确打开优衣库试衣间?网络营销最容易掉进的蠢陷阱
- 放开Linux内核对用户进程可打开文件数和TCP连接的限制
- tcp/ip基本概念
- 减少图片HTTP 请求的方案