Click here to Skip to main content
15,887,337 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting error while i am using session variable to store the value.
I am getting Exception " Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive "

and my web.Config file is

XML
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <sessionState mode="InProc" timeout="60" cookieless="false" />
    <pages enableSessionState="true" />
    <httpModules>
      <remove name="Session" />
      <add name="Session" type="System.Web.SessionState.SessionStateModule" />
    </httpModules>
  </system.web>
</configuration>


Please help me
Posted
Comments
I hope the pages do not explicitly have enableSessionState as false, do they? Review once.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900