Web Service error that has occurred several times
On a number of machines (with Asp.net 1 and 2) we have seen the below error with a random file name (with .dll
extension) produced each time we try to make the web service call.
In the past we have had to reinstall asp.net
and that seems to have fixed it.
However, on one occasion we tried to get the command prompt and windows came back with a error about low resources. Rebooting the server seemed to have fixed this issue.
Any ideas what is causing this error?
Error below:
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.Compile开发者_Go百科r.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
If rebooting solved the issue that means your machine basically ran out of temp file storage space, your regular expressions and lot of tools that involve dynamic compilation (aspx etc), creates lot of temp files, and rebooting server or cleaning temp file should solve issue.
.NET apps are little bad to run for long time, we had server issues when we were not restarting them for days... then as days pass by, the logs, the memory defragmentation etc goes bigger and bigger and i think that sometimes slows everything down. .NET apps usually dont remove locks on resources they opened, its not developer's fault but .net garbage collection isnt that smart, so your temp files may grow if files werent closed and deleted.
Best is to do soft reboot on regular intervals like once a week on sunday night etc will help managing .net apps well.
Does this happen for every call to the web service? If so, then it is probably a permission problem on the C:\Windows\Temp folder.
For web services the .NET runtime creates a dynamic serialization assembly in the temp folder.
To resolve the issue, you need to grant the identity your service is running under write access to the temp folder.
精彩评论