Tuesday, March 6, 2012

Session State Service Configuration in SharePoint 2010

To enable ASP.NET session state, log on the Central Admin
Server using Farm Admin Account, and Either Run PowerShell command 
Enable-SPSessionStateService -DefaultProvision

to create service application with default
state. By default, this will create service application database with
“SessionStateService_<GUID>”, on the same database server where farm
configuration database is located using windows credentials of the logged in

Enable-SPSessionStateService -DatabaseServer YourDBServerName
-DatabaseName YourDBName

to create service application
with specific database name on non-SharePoint configuration database server.
For more details and additional parameters,
Reference link: http://technet.microsoft.com/en-us/library/ff607857.aspx

By enabling Session State Service on your farm,
It would create database on specified server:  SessionStateService_<GUID>

It would create SharePoint Server Session State Service in
Manage Service Applications, please make sure it is showing ‘Started’.

It would add module in all web applications on farm, Check
following entry in web.config:
<add name=”Session”
type=”System.Web.SessionState.SessionStateModule” />

<sessionState mode=”SQLServer” timeout=”60″
allowCustomSqlDatabase=”true” sqlConnectionString=”Data Source=<DatabaseServarName>;Initial
Security=True;Enlist=False;Connect Timeout=15″ />

You have to manually update Web.Config file for the specific
SharePoint web application on all servers in the farm.  - <pages

By performing above steps you can configure Session State service in your Web Application. Now 
you can user Sessions in ShrePoint without ant issues...

No comments:

Post a Comment