title: Foreign Key Causes WCF Socket Connection to Abort
body: <p>I have 2 tables, Unit and SubUnit, with a one to many relationship: a Unit can have 0 or more SubUnits.</p>
  
  <p>I use Linq to SQL (.dbml files) in a WCF Windows Service to access the database.</p>
  
  <p>Using the Service Client, I call any method to retrieve either the Units or the SubUnits and it works fine...as long as there are no SubUnits in the database (0 rows in the SubUnit table). </p>
  
  <p>If there is 1 or more SubUnits, I get the following errors when calling the same methods:</p>
  
  <ul>
  <li><strong>"The socket connection was aborted..."</strong></li>
  <li>with inner exception "The read operation failed, see inner
  exception."</li>
  <li>with inner exception "The socket connection was
  aborted..."</li>
  <li>with inner exception <strong>"An existing connection was forcibly
  closed by the remote host"</strong></li>
  </ul>
  
  <p>I've dropped the tables and re-created them, I've re-added the Unit/SubUnit tables to the DBML, re-installed the service, etc. I've never run into this problem before.</p>
  
  <p>I understand the "Socket aborted" error can be caused by trying to pass too much data over WCF, but there is currently 1 Unit with 1 SubUnit in the database and I still get this error!</p>
  
  <p>Can anyone shed some light on this?</p>