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: The return type or the out argument of an ASMX service method that includes a property that has an internal setter may not be serialized on a computer that has the .NET Framework installed


Symptoms

Consider the following scenario. You have a computer that has the Microsoft .NET Framework 2.0 Service Pack 2 (SP2) or the .NET Framework 3.5 SP1 installed. You use an ASMX service method that includes a property, and the property has an internal setter. The serialization may fail. This problem occurs in a scenario that resembles the following:
  • The public type T includes a public property that has a public getter and an internal setter. For example, the source code may resemble the following.
    public class T
    {

    public <Type> <Propertyname1> { get; internal set; }

    }
  • In a Web service, the return type or the out argument of at least one Web service method returns objects of type T or objects that contain T in their object graphs. For example, the source code may resemble one of the following examples.
    • public T MyWebMethod(…)
      {

      }
    • public void MyWebMethod(…, out U)
      {

      }
      ...
      public Class U
      {
      public T <Propertyname2> { get; set; }
      }
  • Type T or type U is not used in any Web service methods as a non-out-only argument.

    Note If a method has more than one out argument, the out arguments are called non-out-only arguments.
  • The type of the property that has an internal setter is not Enumerable or Collection.
  • Before you applied the .NET Framework 2.0 SP2 or the .NET Framework 3.5 SP1, you generated proxy code to the previously mentioned Web service by using the Wsdl.exe tool or the Visual Studio Add Web reference feature.
  • After you deployed the Web service and clients, you applied the .NET Framework 2.0 SP2 or the .NET Framework 3.5 SP1.
In this scenario, the return type or the out argument from the previously mentioned Web service method will not be serialized. This Web service method is an object of type T or an object that contains T in their object graphs.

Note Currently, there is no separate package for the .NET Framework 2.0 SP2. The .NET Framework 2.0 SP2 is included in the package for the .NET Framework 3.5 SP1.

↑ Back to the top


Resolution

Hotfix Replacement Information

The hotfix that corresponds to KB952883 has been superseded with the hotfix KB976814, which contains all fixes that were previously included in KB952883. You should use the hotfix KB976814 to fix the issues described in KB952883.  For more information, click the following article number to view the article in the Microsoft Knowledge Base:
976814 FIX: A System.InvalidOperationException exception occurs when you use a WCF client proxy that is generated by the ServiceModel Metadata Utility tool from the service metadata that is in the .NET Framework 3.5

↑ 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


References

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

↑ Back to the top


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

↑ Back to the top

Article Info
Article ID : 952883
Revision : 1
Created on : 1/7/2017
Published on : 9/8/2010
Exists online : False
Views : 238