Article ID: 2748720 - View products that this article applies to.
When you run existing XML serialization code in Microsoft Windows Communication Foundation (WCF) 4.5, some serialization or deserialization failures may occur.
Note The existing XML serialization code was compiled and run successfully in Microsoft WCF 4.
The XmlSerializer class is optimized to remove its dependency on the C# compiler in WCF 4.5. This optimization improves performance greatly for cold startup scenarios. However, this optimization may cause some differences in the serialization behavior from WCF 4.
To resolve this issue, apply one of the updates that are described in the following Knowledge Base (KB) articles:
(https://support.microsoft.com/kb/2805221/ )An update is available for the .NET Framework 4.5 in Windows 7 SP1, Windows Server 2008 R2 SP1, Windows Server 2008 SP2, and Windows Vista SP2: May 2013
2805222Note For more information about this issue, see "Issue 1" in the "WCF" section.
(https://support.microsoft.com/kb/2805222/ )An update is available for the .NET Framework 4.5 in Windows 8, Windows RT and Windows Server 2012: May 2013
To work around these serialization issues, you can set the XmlSerializer class to revert to WCF 4.0 behavior. To do this, use the following configuration element:
Note We do not recommend that you apply this workaround on a computer that is running a version of the .Net framework that is earlier than the .Net framework 4.5.
Article ID: 2748720 - Last Review: June 6, 2013 - Revision: 3.0