csc.exe fails suddenly after running several weeks

K

kristof.bonnast

Hi all,

I'm have a console app which is called by a thirth party system over
20000 times a day. This console app links to a webservice on another
server to capture information. This works fine for several weeks, but
after some time I receive following error:

System.InvalidOperationException: Unable to generate a temporary class
(result=1).
error CS0016: Could not write to output file 'h:\temp\uwzshxmr.dll' --
'Could not execute CVTRES.EXE.'
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String
ns, CompilerParameters parameters, Evidence evidence)
at
System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[]
xmlMappings, Type[] types, String defaultNamespace, Evidence evidence,
CompilerParameters 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, Type type)
at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()

I checked several things and nothing changed on the server setup and
there is no disk space issue. When I reboot the machine, it works again
for several weeks/months, but then again the same problem. The only fix
I currently have is rebooting the server when the error occurs. When I
have an error on the server that calls the webservice, all other
applications from other servers calling the same webservice, continue
to work, so the problem seems not related to the webservice as such.

Is this a problem with to much open files/tempfiles/open handles or
something related ?
Anyone any idea how I can pro-active solve this issue ?

Thx in advance,

Kristof
 
G

Guest

This is to do with the way the XML Serialiser works. It generates a class on
the fly to serialize your object and compiles it. In .NET 2 you can select as
a project property to build the XML serialization objects at compile time
(Properties windows, build tab, Generate Serialization Assembly checkbox). If
its .NET 1.0/1.1 then there is a setting you can make on the machine to cache
the xml serialzation stuff to stop it having to keep regenerating. I cant
find a link to it now but its on the web somewhere.

Try that in .NET 2 and see if it helps.

Ciaran O'Donnell

More Info about serializer :
Troubleshooting Common Problems with the XmlSerializer
(http://msdn2.microsoft.com/en-us/library/aa302290.aspx)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top