Unable to generate a temporary class (result=1)

A precompiled ASP.NET 2.0 application (with web services) running in custom domain service account sandbox on IIS 6.0 (Windows 2003 Standard SP1). A service account is in IIS_WPG group so everything concerning required rights should be covered.

When a request comes form a browser it works OK, cause the application is precompiled and need no temporary files. When a Web Service is requested, the client gets:

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\WINDOWS\TEMP\f6vo5epq.0.cs' could not be found
error CS2008: No inputs specified

at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

It’s probably XmlSerializer connected. I have no time to investigate it further so the solution is rather dirty 😉 . Give service account rights’s to C:WINDOWSTEMP directory. Note, in my case giving IIS_WPG right to C:WINDOWSTEMP did not help, strange 🙁

Reference:

  • Introducing XML Serialization

    The XmlSerializer creates C# (.cs) files and compiles them into .dll files in the directory named by the TEMP environment variable; serialization occurs with those DLLs.

2 Comments

  1. Oh, I know that I can add necessary permissions manually… It’s not the point 😉

    I’m complaining about IIS_WPG local group not having ALL the necessary permissions set already. It’s the surprise that caused me problem’s, solutions was this time simple.

    My organization procedures requires me prepare everything for a proper solution deployment. Because of this silly error, deployment must have been postponed, my project had-over was delayed. This cost money!

Back to Top
%d bloggers like this: