title: Session state can only be used when enableSessionState is set to true either in a configuration
body: <p>I am working on Asp.net MVC 2 app with c# by using vs 2010.I am having below mentioned error when I run my app locally under debug mode.</p>
  
  <p>Error message image is as below :</p>
  
  <p><img src="https://i.stack.imgur.com/OvCuW.png" alt="enter image description here"> </p>
  
  <p>Error message text is as below : </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 <code>&lt;configuration&gt;\&lt;system.web&gt;\&lt;httpModules&gt;</code>
    section in the application configuration.</p>
  </blockquote>
  
  <p>What I did for sort out this issue are as below :</p>
  
  <p>Try 1 : web.config file has been changed like below:</p>
  
  <pre><code>&lt;system.webServer&gt;
         &lt;modules runAllManagedModulesForAllRequests="true"&gt;
          &lt;remove name="Session" /&gt;
          &lt;add name="Session" type="System.Web.SessionState.SessionStateModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /&gt;
      &lt;/modules&gt;
  &lt;/system.webServer
  </code></pre>
  
  <p>Try 2 is as below :</p>
  
  <p><img src="https://i.stack.imgur.com/Ea6pq.png" alt="enter image description here"></p>
  
  <p>But Unfortunately still I am having same issue which I have mentioned Above.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p><img src="https://i.stack.imgur.com/nE1Jr.png" alt="enter image description here"></p>
  
  <p>Do you have any solution for this ?</p>