I get the following error in the production environment
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.
The following things I have tried as of now
- Checked
machine.config
andweb.config
, both haveenableSessionState="true"
- Added
enableSessionState="true"
to pages inweb.config
- State module is also added in
<httpmodules>
section - Even tried setting
enableSessionState="true"
in page directive
Note: When I try to debug the code in Dev environment, everything works fine as it should.
Can anyone help me out getting over this issue, I just can't figure out a way out of it.
Best Answer
What does your session state config look like? You probably want to be set up to use inproc session handling.
http://msdn.microsoft.com/en-us/library/ms178586.aspx