title: System.InvalidCastException: Specified cast is not valid when inserting a record in LINQ to SQL
body: <p>On my development machine everything is working fine, however as soon as I publish it to the server I get </p>
  
  <p>System.InvalidCastException: Specified cast is not valid</p>
  
  <p>This is happening on </p>
  
  <pre><code>db.SubmitChanges();
  </code></pre>
  
  <p>I've check out <a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=351358" rel="nofollow noreferrer">https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=351358</a>  and it still causes me errors</p>
  
  <p>I also ran the Windows Update and everything is up to date on the server</p>