title: stuck with enable session state
body: <p>i have an application wherein i am accessing the Session object in the CommonCode.cs file that resides in the App_Code folder. But when the session object is accessed the application throws me an error:</p>
  
  <blockquote>
    <p>Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the \\ section in the application configuration.</p>
  </blockquote>
  
  <p>Now i have already enabled the session state property in the web.config file, here is my code from the web.config file:</p>
  
  <pre><code>&lt;pages enableSessionState="true" autoEventWireup="true"&gt;
      &lt;controls&gt;
          &lt;add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
          &lt;add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
      &lt;/controls&gt;
  &lt;/pages&gt;
  </code></pre>
  
  <p>I dont understand why am i still getting that error !!
  please help !</p>
  
  <p>thanks a lot.</p>