ASP.NET 无法生成临时类(result=1)图解

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.InvalidOperationException: 无法生成临时类(result=1)。 error CS2001: 未能找到源文件“C:\WINDOWS\TEMP\qeqrsu5t.0.cs” error CS2008: 未指定输入
源错误:
执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 堆栈跟踪:
[InvalidOperationException: 无法生成临时类(result=1)。error CS2001: 未能找到源文件“C:\WINDOWS\TEMP\qeqrsu5t.0.cs”error CS2008: 未指定输入] System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence) +1060 System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies) +2024 System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence) +74 System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace) +99 System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace) +348 System.Xml.Serialization.XmlSerializer..ctor(Type type) +6 PowerEasy.Foundation.SiteConfig.GetConfig() +460 PowerEasy.Foundation.SiteConfig.get_SiteInfo() +9 PowerEasy.Foundation.HttpModule.SystemCheckModule.UpdateVirtualPathToSiteConfig() +22 PowerEasy.Foundation.HttpModule.SystemCheckModule.Init(HttpApplication context) +11 System.Web.HttpApplication.InitModulesCommon() +66 System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +1006 System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +259 System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +114 System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +350

 

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


无法生成临时类(result=1)。 error CS2001: 未能找到源文件“C:\WINDOWS\TEMP\qeqrsu5t.0.cs” error CS2008: 未指定输入

解决办法:很简单只要把你的C:\WINDOWS\TEMP\ 文件夹的安全设置高就OK,如下:

posted @ 2013-08-09 18:47  yxyht  阅读(544)  评论(0编辑  收藏  举报