SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

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

I have developed a web application in SharePoint 2010,which deals libraries.I have to redirect the user,so I implemented session state.When I run it I am getting the following exception.

"{"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."}"

1.In Web.config file , I made the sessionstate = true.The application works fine for a web application but it wont work for another web application on the same SharePoint Server farm.i compared both the web.config files ,there is no difference at all.

I don't know why this exception is occured.Please answer this.

share|improve this question
up vote 4 down vote accepted

Read Mark Arends blog post on how to enable SessionState in SharePoint 2010

share|improve this answer
Hi Anders Thank You very much it works well for me. Please have a look at my question at… – surendraj Mar 10 '11 at 11:02

Your Answer


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.