您的位置:首页 > 移动开发

System.UnauthorizedAccessException: 拒绝访问临时目录。以其运行 XmlSerializer 的身份“IIS APPPOOL\DefaultAppPool”没有足够的

2014-01-15 15:30 555 查看
错误信息如下:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

System.UnauthorizedAccessException: 拒绝访问临时目录。以其运行 XmlSerializer 的身份“IIS APPPOOL\DefaultAppPool”没有足够的权限访问临时目录。CodeDom 将使用此进程用于进行编译的用户帐户,因此如果用户对系统临时目录没有访问权限,则将无法编译。使用 Path.GetTempPath() API 可找到临时目录位置。
在 System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
在 System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
在 System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
在 System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
在 System.Web.Services.Protocols.XmlReturn.GetInitializers(LogicalMethodInfo[] methodInfos)
在 System.Web.Services.Protocols.XmlReturnWriter.GetInitializers(LogicalMethodInfo[] methodInfos)
在 System.Web.Services.Protocols.MimeFormatter.GetInitializers(Type type, LogicalMethodInfo[] methodInfos)
在 System.Web.Services.Protocols.HttpServerType..ctor(Type type)
在 System.Web.Services.Protocols.HttpServerProtocol.Initialize()
在 System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)


<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

环境:WIN7, IIS 7, 64BIT

解决方案:

 开始->运行-> inetmgr -> 在IIS信息管理器中,找到 应用程序池 -> DefaultAppPool -> 右键 设置应用程序池默认设置 -> 标识:LocalSystem (本地系统)  -> 确定. 重启 应用程序池。

效果图

pic-1:



pic-2:



参考:
http://www.cnblogs.com/sunxi/p/3356719.html
(结束)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐