Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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.

↑ Back to the top


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.

↑ Back to the top


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:

↑ Back to the top


Status

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

↑ Back to the top


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"

↑ Back to the top


Keywords: kb, kbnotautohotfix, kbfix, kberrmsg, kbbug, kbexpertiseinter, kbsurveynew, kbpubtypekc, kbqfe, kbhotfixserver

↑ Back to the top

Article Info
Article ID : 977020
Revision : 1
Created on : 1/7/2017
Published on : 10/7/2011
Exists online : False
Views : 394