title: .NET 4.5.1 WCF Serialization exception
body: <p>Our LOB application is a client server application which uses CSLA business objects, those business objects are being serialized using the NetDataContractSerializer. The server side is running on WCF and the client has endpoints.</p>
  
  <p>This all works when the client software is running from Windows 7 or Windows 8 having .NET 4.5 installed. </p>
  
  <p>When running the client software on Windows 8 or Windows 8.1 with the latest .NET 4.5.1 Framework the following exception occurs.</p>
  
  <blockquote>
    <p>The formatter threw an exception while trying to deserialize the
    message: There was an error while trying to deserialize parameter
    <a href="http://ws.lhotka.net/WcfDataPortal:FetchResult" rel="nofollow">http://ws.lhotka.net/WcfDataPortal:FetchResult</a>. The InnerException
    message was 'Error in line 1 position 11619. 'Element'
    'm_serializationArray' from namespace
    '<a href="http://schemas.microsoft.com/2003/10/Serialization/Arrays" rel="nofollow">http://schemas.microsoft.com/2003/10/Serialization/Arrays</a>' is not
    expected. Expecting element 'm_keyRehashCount'.'.  Please see
    InnerException for more details.</p>
  </blockquote>
  
  <p>The most inner exception is</p>
  
  <blockquote>
    <p>Error in line 1 position 11619. 'Element' 'm_serializationArray' from
    namespace '<a href="http://schemas.microsoft.com/2003/10/Serialization/Arrays" rel="nofollow">http://schemas.microsoft.com/2003/10/Serialization/Arrays</a>'
    is not expected. Expecting element 'm_keyRehashCount'.</p>
  </blockquote>
  
  <p>I cannot find anything about this on stackoverflow or on google, i have posted this same question on the CSLA forums and perhaps i should also post it on Connect. But maybe i'm lucky here? </p>
  
  <p>I need some time to backup my development environment before i update the .NET Framework to 4.5.1</p>
  
  <p>I can think of two possible solutions:</p>
  
  <ul>
  <li>upgrade the 2008 server to .NET 4.5.1.</li>
  <li>force the client software to use .NET 4.5</li>
  </ul>
  
  <p>Is it possible to force the client software to use .NET 4.5 only?
  Any other idea's?</p>