Monday, July 22, 2013

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.

Exception Details: System.Web.HttpException: 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.


It's an error that could make you loose some of hair if you don't get some precautions. 

How to proceed to solve:


  • Verify if your enableSessionState is set to true. There is a tag in your web.config file, as you can see here: 

<pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" ..

  • When you're still looking the web.config check the httpmodule: 

<add name="Session" type="System.Web.SessionState.SessionStateModule" />

1 comment:

  1. Also had the same error. We moved a Web Application from SharePoint 2010 to SharePoint 2013 Environment. And on the SharePoint 2013 Environment this was not set to true. So I did the steps above on the 2013 Environment and the Issue was gone.

    ReplyDelete

What is the cost of migration to SharePoint 2016?

Below are the points to understand better how much the cost of migration to SharePoint 2016 could be for your organization: What ver...