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: 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"


View products that this article applies to.

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.

↑ Back to the top


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:

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.
File nameFile versionFile sizeDateTime
System.web.services.dll2.0.50727.4055839,68017-Jul-200909:22

↑ 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


Keywords: kbnotautohotfix, kbhotfixdev, kbexpertiseadvanced, kbsurveynew, kbqfe, kbhotfixserver, kb

↑ Back to the top

Article Info
Article ID : 973136
Revision : 7
Created on : 9/20/2018
Published on : 9/20/2018
Exists online : False
Views : 547