日期:2014-05-18  浏览次数:20469 次

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


------解决方案--------------------
还是组件的问题。
------解决方案--------------------
开起来,开发测试用的机器还是尽量少装软件的好。
------解决方案--------------------
NETWORK SERVICE用户对指定的目录没有足够的权限