无法生成临时类(result=1)的一种解决方法2


在运行.NET 的程序时,有时会出现如下的错误

 


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


无法生成临时类(result=1)。
error CS0016: 未能写入输出文件“c:\Documents and Settings\User\Local Settings\Temp\szcwt_ha.dll”--“拒绝访问。 ”

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.InvalidOperationException: 无法生成临时类(result=1)。
error CS0016: 未能写入输出文件“c:\Documents and Settings\User\Local Settings\Temp\szcwt_ha.dll”--“拒绝访问。 ”


源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。


堆栈跟踪:

[InvalidOperationException: 无法生成临时类(result=1)。
error CS0016: 未能写入输出文件“c:\Documents and Settings\User\Local Settings\Temp\szcwt_ha.dll”--“拒绝访问。 ”
]
   We7.Framework.Util.SerializationHelper.Load(Type type, String filename) +213
   We7.Framework.Config.DefaultConfigFileManager.DeserializeInfo(String configfilepath, Type configtype) +43
   We7.Framework.Config.DefaultConfigFileManager.LoadConfig(DateTime& fileoldchange, String configFilePath, IConfigInfo configinfo, Boolean checkTime) +318
   We7.Framework.Config.GeneralConfigFileManager.LoadConfig() +399
   We7.Framework.Config.GeneralConfigs.GetConfig() +130
   We7.UrlRewriter.HttpModule.Init(HttpApplication context) +44
   System.Web.HttpApplication.InitModulesCommon() +66
   System.Web.HttpApplication.InitModules() +46
   System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +612
   System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +264
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +104
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +290

 

 


版本信息: Microsoft .NET Framework 版本:2.0.50727.3623; ASP.NET 版本:2.0.50727.3053


 

除了可能是temp目录权限设置不正确外,还有一种可能,如果你装了杀毒软件,有时候即使你把杀毒软件关闭,有些安全设置依然会起作用。如果你安装有COMODO杀毒软件,那么恭喜你,我来告诉你下面该如何操作。

 

 

 

ok,从新运行你的.NET程序试试吧

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM