views:

108

answers:

2

Hi,

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?

JD.

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.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

+1  A: 

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.

Akash Kava
Hi Akash, not having too much experience in the .net, I think my manager will not believe me if I give him your excellent explanation. Can you give me some more information or links that will help me convince him to reboot the machine on a regular period?
JD
Also, as I mentioned we had to reinstall asp.net on a couple of occasions. Is this related?
JD
I know, its hard, but I dont see any links about it, however its only our experience, our servers would go slower slower, like one page request comes in fraction of second and after a month with no load on server, it would take 20-30 seconds, we plotted graph and we found restarting sunday night would solve problem. Your problem is temp files, you can create a tool to delete temp files, but this is problem since temp files may be needed by some process that is live,thats why rebooting is only solution, however i will watch for any links and will post here.
Akash Kava
Its simple reinstalling asp.net would shutdown iis, so all temp file locks are terminated and on restarting it would delete temp files. Its simple that your temp files are growing too fast and old ones arent getting deleted.
Akash Kava
I read a bit about dynamic compilation and what I do not understand is if the web service is compiled once (on first call) and it never changes, why do lots of temp files kept getting created? Also you mentioned regular expression, how does this create temp files?
JD
@JD, your error was on windows\temp folder. This folder is used by the .NET runtime to create dynamic serialization assemblies for the web services. http://support.microsoft.com/kb/872800 This code converts the incoming XML request to a .NET object representation and vice versa. You are getting confused with ASP.NET page compilation which occurs in the Temporary ASP.NET Files folder. See http://msdn.microsoft.com/en-us/library/ms366723.aspx for more information.
Tuzo
A: 

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.

Tuzo
The web service has been working fine for weeks and then we got these errors. This has happened on several machines which have not had any permission changes.
JD