多次发生 Web 服务错误

2024-04-29

在许多机器(使用 Asp.net 1 和 2)上,我们看到以下带有随机文件名的错误(使用.dll每次我们尝试进行 Web 服务调用时都会生成此扩展名。

过去我们不得不重新安装asp.net这似乎已经解决了问题。

然而,有一次我们尝试获取命令提示符,但 Windows 返回了有关资源不足的错误。重新启动服务器似乎已经解决了这个问题。

有什么想法导致此错误吗?

错误如下:

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.IO.FileNotFoundException: Could not find file 'c:\windows\Temp\aweww1ss.dll'.
File name: 'c:\Windows\Temp\aweww1ss.dll'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
   at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
   at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
   at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
   at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
   at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters 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, Evidence evidence)
   at System.Web.Services.Protocols.SoapServerType..ctor(Type type, WebServiceProtocols protocolsSupported)
   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   at System.Web.Services.Protocols.ServerProtocol.SetContext(Ty

如果重新启动解决了问题,这意味着您的计算机基本上耗尽了临时文件存储空间,您的正则表达式和许多涉及动态编译(aspx 等)的工具,创建了大量临时文件,重新启动服务器或清理临时文件应该可以解决问题。

.NET 应用程序长时间运行有点糟糕,当我们几天没有重新启动它们时,我们会遇到服务器问题...然后随着时间的推移,日志、内存碎片整理等变得越来越大,我认为有时会变慢一切都下来了。 .NET 应用程序通常不会删除它们打开的资源上的锁定,这不是开发人员的错,但 .NET 垃圾收集并不那么智能,因此如果文件未关闭和删除,您的临时文件可能会增长。

最好是定期进行软重启,例如每周一次的周日晚上等,这将有助于很好地管理 .net 应用程序。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

多次发生 Web 服务错误 的相关文章

随机推荐