title: Error while using Linq "Include" method with Entity framework 4.1, Bug?
body: <p>I am using SQL Azure as database with code first technique of Entity framework 4.1.  I'm accessing EF from WCF as middle tier and providing the service reference to ASP.NET MVC 3.</p>
  
  <p>The relational scenario in EF is <code>A-&gt;B-&gt;C</code> so as usual I tried to get A including B including C with few possibilities: </p>
  
  <pre><code>db.A.Include("B").Include("B.C")
  db.A.Include("B").Include("C")
  </code></pre>
  
  <p>But in the Service itself running perfect. Since adding the reference to the web application it attempts to serialize and throws the exception below. I tried to make true-false lazy loading also without success.</p>
  
  <pre><code>"The underlying connection was closed: The connection was closed unexpectedly"
  Stack Trace found:
   at System.Net.HttpWebRequest.GetResponse() at
   System.ServiceModel.Channels.HttpChannelFactory.
       HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
  </code></pre>
  
  <p>I visited <a href="http://consultingblogs.emc.com/merrickchaffer/archive/2007/09/19/WCF-System.Net.WebException_3A00_-The-underlying-connection-was-closed_3A00_-The-connection-was-closed-unexpectedly.aspx" rel="nofollow">this page</a> to resolve, and added the suggested attributes in web.config. Now I'm suddenly getting error:</p>
  
  <blockquote>
    <p>The server did not provide a meaningful reply; this might be caused by
    a contract    mismatch, a premature session shutdown or an internal
    server error</p>
  </blockquote>
  
  <p>I thought it might be issue of some tag/atrribute mismatch in client and service web.configs but everything is right there. One thing I could not get to passing the List of objects with loading of its entire cllection properties, from wcf service to web application is found very heavy and low in performance. still facing the above issues to get the loaded list at web application in above explained architecture. can some body help here....</p>