title: Session state mode set to SQLSERVER getting error
body: <p>I want to store my session in SQL Server database and for that I want to use session state mode SQLSERVER, and I have changed my <code>web.config</code> and added the session state attribute: </p>
  
  <pre><code>&lt;sessionState mode="SQLServer" timeout="30" sqlConnectionString="Data Source=server;user id=sa;password=sa;" cookieless="false" /&gt;
  </code></pre>
  
  <p>When I run my application I get this error:</p>
  
  <blockquote>
    <p>Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode. </p>
  </blockquote>
  
  <p>Please help me, I am in serious problem. Thanks &amp; Regards.</p>