Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 08, 2012 10:47 AM by Richey
Mar 02, 2012 07:26 AM|LINK
I am getting exception on following code:
Exception thrown is:
'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 <configuration>\<system.web>\<httpModules>
section in the application configuration.'
After getting above exception I added EnableSessionState="true" in my
page directive in my aspx page. But got same exception again then I added following code in my web.conf file:
<pages enableSessionState="true" compilationMode="Auto" maintainScrollPositionOnPostBack="true">
But I am still getting same exception. What should I do??
Can any one help me??????????
Mar 02, 2012 07:31 AM|LINK
do like this
Mar 02, 2012 07:40 AM|LINK
I have tried that. But still I got that exception. I don't think above exception has any relation with your given code.
Mar 08, 2012 10:47 AM|LINK
Maybe you have multiple page and you don’t add the EnableSessionState with true to all the pages. You can also refer to the below link about the similar error.