To enable ASP.NET session state:
- Enter the following PowerShell command in the SharePoint 2010 Management Shell window:
Enable-SPSessionStateService –DefaultProvision
- On each web application for which you want to use session state, edit the web.config file and set the enableSessionState property of the pages element as follows:
<pages enableSessionState="true">