You would have noticed that after installing SharePoint 2010 and deploying your custom solutions, code which is dependent on Session variables would not work as expected. That is because the Session state is not enabled by default. You just need to run this cmdlet in Powershell and boom Session starts working.
Enable-SPSessionStateService –DefaultProvision
A new service Application by name "SharePoint Server ASP.NET Session State Service" should be available.
The web.config will have this additional entry under configuration/system.webserver/modules
Also dont forget to change the attribute "enableSessionState" to true in the page Element.
Enable-SPSessionStateService –DefaultProvision
A new service Application by name "SharePoint Server ASP.NET Session State Service" should be available.
The web.config will have this additional entry under configuration/system.webserver/modules
Also dont forget to change the attribute "enableSessionState" to true in the page Element.
Comments
Post a Comment