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

Article translations Article translations
Article ID: 322886 - View products that this article applies to.
This article was previously published under Q322886
We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 7.0 running on Microsoft Windows Server 2008. IIS 7.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site:
http://www.microsoft.com/technet/security/prodtech/IIS.mspx
For more information about IIS 7.0, visit the following Microsoft Web site:
http://www.iis.net/default.aspx?tabid=1
Expand all | Collapse all

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.

Properties

Article ID: 322886 - Last Review: July 3, 2008 - Revision: 6.1
APPLIES TO
  • Microsoft Web Services (included with the .NET Framework) 1.0
  • Microsoft Internet Information Server 4.0
  • Microsoft Internet Information Services 5.0
Keywords: 
kbbug kbpending KB322886

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com