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 am looking to enable session state so that custom developed web parts are able to use the ASP.Net session state which is not enabled by default. Under normal circumstances, I know that session state can be stored InProc on a web server via the ASP.Net State Service and is enabled on a web application via the <sessionState mode="InProc" ...> key. I also know that session state can be stored in a SQL Server database which is good in a web farm environment.

I have come across a handful of articles about enabling the ASP.Net Session State service and storing session state InProc, but have also read articles where using Enable-SPSessionStateService seems to be the correct approach.

My question: Obviously, Enable-SPSessionStateService is supported and appears to be the correct approach since it will automatically add the necessary web.config settings to any web applications created on the farm. Is it also supported to manually enable the ASP.Net Session State service and add the appropriate web.config entries? Any potential issues to be aware of with either approach?

The following post gives a fairly useful description of Enable-SPSessionStateService and how to enable it:

share|improve this question

I haven't enabled it myself but the article you referenced seems to answer part of your question quite clearly:

"The only way to install ASP.Net Session State is through PowerShell using *-SPSessionStateService. [Enable | Disable | Get | Set]-SPSessionStateService"

By the look of it, using Enable-SPSessionStateService still means that you will have to make manual web.config changes on a per Web app basis to set enableSessionState="true".

share|improve this answer

Following post contains step-wise explanation of Session State Service Configuration, Which I have successfully performed on my application:

SharePoint 2010 Session State

Hope this helps you.

share|improve this answer

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.