Advertisement
private775

Enable Session in SP2010

Aug 28th, 2018
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. https://sharepoint.stackexchange.com/questions/34891/httpcontext-current-session-is-null
  2. https://blogs.msdn.microsoft.com/markarend/2010/05/27/using-session-state-in-sharepoint-2010/
  3.  
  4. Yes, If you want to use the session-state, you should enable it in the web.config of the webapplication.
  5. To enable ASP.NET session state:
  6. Enter the following PowerShell command in the SharePoint 2010 Management Shell window: Enable-SPSessionStateService –DefaultProvision
  7. or more advanced:
  8. Enable-SPSessionStateService -DatabaseName [-DatabaseServer ] [-DatabaseCredentials ]
  9. 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:
  10. < pages enableSessionState="true"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement