title: AllowPartiallyTrustedCallersAttribute error with MVC 2 and .NET 4.0
body: <blockquote>
    <p>Assembly 'Foo.BAL, Version=1.0.0.0,
    Culture=neutral, PublicKeyToken=null'
    is marked with the
    AllowPartiallyTrustedCallersAttribute,
    and uses the level 2 security
    transparency model.  Level 2
    transparency causes all methods in
    AllowPartiallyTrustedCallers
    assemblies to become security
    transparent by default, which may be
    the cause of this exception.</p>
    
    <p>Description: An unhandled exception
    occurred during the execution of the
    current web request. Please review the
    stack trace for more information about
    the error and where it originated in
    the code.</p>
  </blockquote>
  
  <p>I have a standard Business Layer calling into my Data Access Layer, why am I getting this error with MVC 2 and .NET 4.0?</p>
  
  <p>I was using the Enterprise Block, so I ditched it and am now just using standard System.Data.SqlClient APIs to minimize dependencies.</p>
  
  <p><strong>EDIT: If I change the Target Framework on my BAL and DAL projects to 3.5 I do not get the error.</strong></p>