Logga in med Microsoft
Logga in eller skapa ett konto.
Hej,
Välj ett annat konto.
Du har flera konton
Välj det konto som du vill logga in med.
Engelska
Vi beklagar. Den här artikeln är inte tillgänglig på ditt språk.

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.

Symptoms

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

Resolution

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

Status

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

References

Behöver du mer hjälp?

Vill du ha fler alternativ?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Hade du nytta av den här informationen?

Vad påverkade din upplevelse?
Genom att trycka på skicka, kommer din feedback att användas för att förbättra Microsofts produkter och tjänster. IT-administratören kan samla in denna data. Sekretesspolicy.

Tack för din feedback!

×