Friday, 4 June 2010

SharePoint Session State

Problem: Building a composite application in SharePoint 2010 I need to store information for a user. A basket/shopping cart like feature is required.
Initial Hypothesis: Store data against the user profile, or a custom list and retrieve using Linq/CAML or use session state. Session state is not supported by SP2010 OOTB and it can have severe performance implications.
Resolution: enable ASP.NET session state. This stores the session state in a SQL Server database. Start the Powershell cmd prompt:

Enter the following PowerShell command in the SharePoint 2010 Management Shell window:
Enable-SPSessionStateService -DatabaseName "ASPNet_State" -DatabaseServer "" -SessionTimeout 30Each web application for which you want Edit the web.config file and set the enableSessionState property of the pages element as follows:

More Info:


Post a Comment