BUG: Error When You Invoke Methods on a Web Service by Using ASP (322886)



The information in this article applies to:

  • Microsoft Web Services (included with the .NET Framework) 1.0
  • Microsoft Internet Information Server 4.0
  • Microsoft Internet Information Server 5.0

This article was previously published under Q322886
We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 6.0 running on Microsoft Windows Server 2003. IIS 6.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site:

SYMPTOMS

When you invoke methods on a Web service, you may receive the following error message:
System.InvalidOperationException: Unable to generate a temporary class
(result=1). error CS2001: Source file 'C:\WINNT\TEMP\gggcyckb.0.cs' could not 
be found error CS2008: No inputs specified at 
System.Xml.Serialization.Compiler.Compile() at 
System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings) at 
System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings) at 
System.Web.Services.Protocols.SoapClientType..ctor(Type type) at 
System.Web.Services.Protocols.SoapHttpClientProtocol..ctor() at 
SDAccounts.swd_dotnetdev.Organizations..ctor() at 
SDAccounts.Contacts.GetContactInfo(Object Status, Object& ErrorString)
					

CAUSE

ASP.NET Web Services sometimes use the system Temp folder when they process WebMethods. If the thread that is processing the request uses an Identity that does not have read/write access to that folder, you receive the error message.

RESOLUTION

To avoid this problem, give read/write priviledges for the Temp folder to the ASPNET account. When ASP.NET Web Services process WebMethods, the identity that is used most frequently to gain access to the system Temp folder is the local ASPNET account, which is the default account under which ASP.NET applications run.

However, if you have configured your application to use impersonation in its Web.config file, the thread can also use the identity of any caller. If this is the case, all potential calling identities must have read/write priviledges to the Temp folder. A likely calling identity is the Internet Information Services (IIS) application's anonymous account (typically the ISUR_xxx account). The thread may also use the IWAM_xxx account.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Modification Type:MinorLast Reviewed:5/3/2006
Keywords:kbbug kbpending KB322886