title: WCF can't serialize cyclic references
body: <p>I have a database with a lots of relationships between <code>Tables</code> and a <code>Silverlight</code> client that connects to my server with <code>WCF service</code> on <code>ASP.Net</code> side.</p>
  
  <p>First i used <code>LINQ to SQL</code> as a robust mapper tables to object and in a <code>WebMethod</code> that returns a <code>List&lt;Foo&gt;</code> of my Database's object(suppose <code>GetFoo()</code>). The <code>Foo</code> has lots of relationships with other objects that each of that have lots of realaships too,(this means , there is a PK and FK between tables).also i use <code>Microsoft Service Trace Viewr</code> for track my service</p>
  
  <p>When i call GetFoo() , WCF returns this error:</p>
  
  <blockquote>
    <p>Object graph for type 'X.Y.Z' contains  cycles and cannot be serialized if
    reference tracking is disabled</p>
  </blockquote>
  
  <p>I searched this error and find <a href="http://chabster.blogspot.com/2008/02/wcf-cyclic-references-support.html" rel="nofollow">this great post</a> but that is not working properly and i see same error too.</p>