SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

I have set it to true but still get the above error

 <pages enableSessionState="true" enableViewState="true" enableViewStateMac="true"
 validateRequest="true" 
 pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, 
 Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, 
 PublicKeyToken=71e9bce111e9429c" asyncTimeout="7">
share|improve this question

It's not enough to put it on the page directive.

ASP.NET session state service is automatically disabled in normal installations of SharePoint (2007/2010).

You'll need to make sure that the service is activated and your web.config is configured properly eg:

<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"> 

Within the Central Administration, you also need to activate it if you're running SP2007 or through PowerShell if it's 2010 (Enable-SPSessionStateService and Highly trusted SharePoint Expert Nik Patel has a detailed walkthrough over here : http://nikspatel.wordpress.com/2012/02/12/enable-asp-net-session-state-on-sharepoint-2010-application/

Finally SharePoint is usually used with multiple WFE so make sure that you know what sticky session means and that your load balancer is handling it if you have more than 1 WFE.

share|improve this answer
    
Thanks Francois Verbeeck My issue has been resolved – user44914 Aug 7 '15 at 13:23

If your modules section contains this element:

<remove name="Session" />

Comment or delete it, This should solve the problem.

share|improve this answer

The solution is go to

C:\inetpub\wwwroot\wss\VirtualDirectories\(site application folder)

open web.config file, search for pages tag and set enableSessionState="true".

share|improve this answer

I did all the web.config file modifications that I saw across the web and it did not solve the issue.I just typed the following command in the SharePoint Management Shell and it worked :

Enable-SPSessionStateService -DefaultProvision

I'm using the original web.config before any modifications, which means that my enableSessionState tag is still set to "false".

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.