private775 icon

Enable Session in SP2010

private775 | PRO | 08/28/18 08:26:25 AM UTC | 0 ⭐ | 643 👁️ | Never ⏰ | []
text |

750 B

|

None

|

0 👍

/

0 👎

https://sharepoint.stackexchange.com/questions/34891/httpcontext-current-session-is-null
https://blogs.msdn.microsoft.com/markarend/2010/05/27/using-session-state-in-sharepoint-2010/
 Yes, If you want to use the session-state, you should enable it in the web.config of the webapplication.
To enable ASP.NET session state:
Enter the following PowerShell command in the SharePoint 2010 Management Shell window: Enable-SPSessionStateService –DefaultProvision
or more advanced:
Enable-SPSessionStateService -DatabaseName [-DatabaseServer ] [-DatabaseCredentials ]
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"

Comments