FIX: ArgumentNullException exception error message when a .NET Framework 2.0 SP2-based application tries to process a response with zero-length content to an asynchronous ASP.NET Web service request: "Value cannot be null"

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

SYMPTOMS

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

RESOLUTION

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

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

Prerequisites

You must have the .NET Framework 2.0 Service Pack 2 (SP2) or the .NET Framework 3.5 SP1 installed to apply this hotfix.

Restart requirement

You do not have to restart the computer after you install the hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
System.web.services.dll2.0.50727.4055839,68017-Jul-200909:22

STATUS

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

Properties

Article ID: 973136 - Last Review: April 30, 2010 - Revision: 5.0
APPLIES TO
  • Microsoft .NET Framework 2.0 Service Pack 2
  • Microsoft .NET Framework 3.5 Service Pack 1
Keywords: 
kbexpertiseadvanced kbsurveynew kbqfe kbhotfixserver KB973136

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