Working with session variables in SP2010

After our migration we had some issues with a few SP2007 webparts that were using the session state. By default the session state on SP2010 is disabled. You can enable this by modifying the web.config file:

Add the SessionStateModule:



Enable the sessionstate:


Now you have to start the sessionstate service so execute the following command on you SP2010 server:

Enable-SPSessionStateService –DefaultProvision