title: Stackoverflow exception over WCF (while manually it simply works)
body: <p>I am experiencing this weirdest problem ever.
  I have EF entities that we are passing between a client and a server via WCF.</p>
  
  <p>When i am serializing them manually as follows:</p>
  
  <pre><code>        var xmlSerializer = new DataContractSerializer(typeof(T), null, int.MaxValue, false, true, null);
          var textWriter = new StringWriter();
          var xmlTextWriter = new XmlTextWriter(textWriter);
          xmlSerializer.WriteObject(xmlTextWriter, source);
          return textWriter.ToString();
  </code></pre>
  
  <p>Everything is ok.
  But when they are being transferred over the wcf wire i get stackoverflow exception.</p>
  
  <p>I tried debugging the source code, but since it is stackoverflow all the locals are unavailable.</p>
  
  <p>I ran out of ideas, if it serializes manually - what could be different in the WCF that would cause it to stackoverflow?</p>