Search This Blog

Monday, November 24, 2014

Enable Session State in SharePoint 2010

This service is automatically disabled in normal installations of SharePoint 2010.It can be enabled using the instructions below.


To resolve the error and to enable session state for SharePoint there are two entries that need to exist in the web.config file. 

The first is to ensure that enableSessionState is set to TRUE.
<pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" validateRequest="false" pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" asyncTimeout="7">

The second is to ensure that the remove and add lines exist in the modules section for Session.
<modules runAllManagedModulesForAllRequests="true">
<remove name="Session" />
<add name="Session" type="System.Web.SessionState.SessionStateModule" preCondition="" />
modules>

Once you have made the modifications above to the web.config file you need to ensure that the State Service service application is running. You can check the status of this through Central Administation.

The error should now go away and Session State should be enabled for your web application.

No comments:

Post a Comment