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

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

On This Page

SYMPTOMS

You use the ServiceModel Metadata Utility tool (SvcUtil.exe) to generate a Windows Communication Foundation (WCF) client proxy from service metadata that is based on the Microsoft .NET Framework 3.5. However, XmlSerializable types are generated together with incorrect XmlEnumAttribute attributes in the client proxy. Therefore, a System.InvalidOperationException exception occurs when you open the client proxy, and you receive an error message that resembles the following:
There was an error reflecting type "<type name>".

CAUSE

The problem occurs because the definition of an instance of the XmlAnyElementAttribute class lacks an XML namespace. Therefore, the System.InvalidOperationException exception occurs when SvcUtil.exe processes the instance.

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 resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:
http://support.microsoft.com/contactus/?ws=support
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

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

Note If you receive an “This update does not apply to this system” error when you try to install the hotfix, make sure that your operating system (and service pack) version is supported by the hotfix.

Restart requirement

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

Hotfix replacement information

This hotfix does not replace 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.
For all supported x86-based versions of Windows Server 2000, of Windows Server 2003, and of Windows XP
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
System.xml.dll2.0.50727.44252,048,00019-Nov-200907:10x86
For all supported x64-based versions of Windows Server 2000, of Windows Server 2003, and of Windows XP
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
System.xml.dll2.0.50727.44252,048,00019-Nov-200906:43x64
For all supported IA-64-based versions of Windows Server 2000, of Windows Server 2003, and of Windows XP
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
System.xml.dll2.0.50727.44252,048,00019-Nov-200906:43 IA-64
For all supported x86-based versions of Windows Vista SP2 and of Windows Server 2008 SP2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
System.xml.dll2.0.50727.44282,048,00007-Dec-200919:16
For all supported x64-based versions of Windows Vista SP2 and of Windows Server 2008 SP2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
System.xml.dll2.0.50727.44282,048,00007-Dec-200919:15
For all supported IA-64-based versions of Windows Vista SP2 and of Windows Server 2008 SP2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
System.xml.dll2.0.50727.44282,048,00007-Dec-200919:27

STATUS

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

MORE INFORMATION

For more information about the ServiceModel Metadata Utility tool, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn.microsoft.com/en-us/library/aa347733.aspx

Properties

Article ID: 976814 - Last Review: February 27, 2012 - 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 KB976814

Give Feedback