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: http://www.todd-carter.com/post/2010/04/30/A-Session-State-By-Any-Other-Name.aspx.

2 Answers 2


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


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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