FIX: An application that is based on the Microsoft .NET Framework 2.0 Service Pack 2 and that invokes a Web service call asynchronously throws an exception on a computer that is running Windows 7

Article translations Article translations
Article ID: 977020 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

On a computer that is running Windows 7, you experience one or more of the following symptoms.

Symptom 1

Consider the following scenario:
  • You run an asynchronous Web service that uses the Microsoft .NET Framework 2.0 Service Pack 2 (SP2) on a server.
  • The HttpWebRequest asynchronous operation sends a Web request to the Web service.
  • The Web service throws an exception.
In this scenario, the HttpWebRequest asynchronous operation does not call the BeginGetResponse method or the callback function. However, the HttpWebRequest asynchronous operation is unexpectedly completed. The Web service then stops responding. Additionally, the CPU usage on the server may increase to 100 percent, and then the server stops responding.

Symptom 2

Consider the following scenario:
  • You run a Microsoft .NET Framework 2.0 SP2-based application that calls a Web service by using the Microsoft ASP.NET Web service client components. For example, the application code is generated by the Wsdl.exe process, or the application calls the SoapHttpClientProtocol class.
  • The client invokes the Web service call asynchronously.
  • The client sends a request to a server.
  • The client then receives a Web response that has zero-length content.
When the Web service tries to process this response in this scenario, a System.ArgumentNullException exception is thrown. Then, you receive the following error message:
Value cannot be null.
Note This problem does not occur when the client invokes the Web service call synchronously.

CAUSE

Symptom 1

This problem occurs because the .NET Framework exception handling does not consider the case in which the HttpWebRequest.EndGetRequestStream method throws an exception when that exception contains a response from the server.

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To download this hotfix, visit the following Microsoft Connect Web site:
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=27977

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about the issues that are described in the "Symptom 1" section, click the following article number to view the article in the Microsoft Knowledge Base:
973134 FIX: The Web service stops responding, and an exception is thrown when you run a .NET Framework 2.0 S-based asynchronous Web service
For more information about the issues that are described in the "Symptom 2" section, click the following article number to view the article in the Microsoft Knowledge Base:
973136 FIX: ArgumentNullException exception error message when a .NET Framework 2.0 S-based application tries to process a response with zero-length content to an asynchronous ASP.NET Web service request: "Value cannot be null"

Properties

Article ID: 977020 - Last Review: October 7, 2011 - Revision: 7.0
APPLIES TO
  • Microsoft .NET Framework 2.0 Service Pack 2, when used with:
    • Windows 7 Enterprise
    • Windows 7 Enterprise N
    • Windows 7 Professional
    • Windows 7 Professional N
    • Windows 7 Ultimate
    • Windows 7 Ultimate N
Keywords: 
kbfix kberrmsg kbbug kbexpertiseinter kbsurveynew kbqfe KB977020

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