locked
Error CS2001 - Unable to generate a temporary class (result=1). Source file 'C:\WINDOWS\TEMP\yoygjani.0.cs' could not be found

    Question

  • I'm trying to consume my web service (written in ASP.net) from another asp.net page; both worked fine until I used IIS on its own instead of visual studio's web servers. Now, when I try to connect to the web service with my consumer all I get is:

    Code Snippet

    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\yoygjani.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) at uhlidtapps.DWHStatusWebService.getSimpleAdvice() in c:\temp\dwhstatuspage\d1c83e8c\553588f6\App_WebReferences.z__tuoz_.1.cs:line 492 at _Default.form1_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\DWHStatusPage\Default.aspx.vb:line 20

     

    I've looked on the net for both errors and all I keep hearing is that the ASPNET/Network service/account that's accessing the web service all need to be able to write to "C:\windows\temp" or to "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727" directories.  I've given all of the above accounts permissions to these directories and still no luck.

    Please, does anyone have any ideas? 

    Help is very much appreciated.

    Matthew Rose 

    Monday, April 30, 2007 7:44 AM

Answers

  •  

    from your message it is clear that you have already tried the best workaround but I want you to check the user account that is accessing your webservice and confirm that particular account is having access to those folders. see this link http://support.microsoft.com/kb/908158.

     

    what I mean is a cross check

     

    are you trying this with IIS? if so as a last option you can try reinstalling IIS

     

     

    Monday, April 30, 2007 11:05 AM
  • I've now managed to sort the problem, by giving the user that the application pool of the web service runs with all but full permissions on "C:\windows\temp" on our server. I tried this once before, but had no luck.

    Thanks for all of the suggestions though; I now know what to look for if this happens in future.

    Thanks

    Matthew Rose

    Wednesday, May 02, 2007 7:33 AM

All replies

  •  

    from your message it is clear that you have already tried the best workaround but I want you to check the user account that is accessing your webservice and confirm that particular account is having access to those folders. see this link http://support.microsoft.com/kb/908158.

     

    what I mean is a cross check

     

    are you trying this with IIS? if so as a last option you can try reinstalling IIS

     

     

    Monday, April 30, 2007 11:05 AM
  • Are you able to generate / view the WSDL for this application?

     

    What version of the .NET Framework are you using?

     

    Can you please post more details (full exception stack) about both the errors you're seeing?

     

    A couple of places to check: there are two "temp" directories (C:\temp and C:\windows\temp). It looks like something is generating a parallel directory structure (C:\temp\dwhstatuspage and C:\inetpub\wwwroot\DWHstatuspage) -- any ideas what?

     

    error CS2001: Source file 'C:\WINDOWS\TEMP\yoygjani.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) at uhlidtapps.DWHStatusWebService.getSimpleAdvice() in c:\temp\dwhstatuspage\d1c83e8c\553588f6\App_WebReferences.z__tuoz_.1.cs:line 492 at _Default.form1_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\DWHStatusPage\Default.aspx.vb:line 20

    Tuesday, May 01, 2007 4:56 AM
    Moderator
  • I've now managed to sort the problem, by giving the user that the application pool of the web service runs with all but full permissions on "C:\windows\temp" on our server. I tried this once before, but had no luck.

    Thanks for all of the suggestions though; I now know what to look for if this happens in future.

    Thanks

    Matthew Rose

    Wednesday, May 02, 2007 7:33 AM