当前位置: 代码迷 >> Web Service >> temp?该如何解决
  详细解决方案

temp?该如何解决

热度:800   发布时间:2013-01-05 15:20:39.0
temp????????
请问下.net报错。什么啥原因啊?
System.UnauthorizedAccessException: Access to the temp directory is denied. Identity 'NT AUTHORITY\NETWORK SERVICE' 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 doesnt have access to system temp directory, you will not be able to compile. Use Path.GetTempPath() API to find out the temp directory location. at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, CompilerParameters parameters, Evidence evidence) at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, CompilerParameters parameters, Assembly assembly, Hashtable assemblies) at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence) at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type) at System.Web.Services.Protocols.SoapClientType..ctor(Type type) at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor() at NewDiscoversources.GetConfigStr..ctor() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\eef5bbab\29a0a712\App_WebReferences.t8imega7.2.cs:line 36 at Default3.Page_Load(Object sender, EventArgs e) in f:\fxzy\Default3.aspx.cs:line 22

------解决方案--------------------
访问临时目录无权限,没遇到过,帮你顶
------解决方案--------------------
引用:
Service Unavailable多半因为ApplicationPool挂了,重新打开。

改完权限最容易出现的就是ApplicationPool挂了,或者不知道为什么WebSite的ApplicationPool变成了其他的不是你想到的ApplicationPool了,检查ApplicationPool。祝你好运了。
------解决方案--------------------
引用:
引用:

Service Unavailable多半因为ApplicationPool挂了,重新打开。

改完权限最容易出现的就是ApplicationPool挂了,或者不知道为什么WebSite的ApplicationPool变成了其他的不是你想到的ApplicationPool了,检查ApplicationPool。祝你好运了。


lz说已经重启iis了。
  相关解决方案