Session State Causing Upgrade Failure

This was a new one for me. I was working on a farm where the Session State Service caused a failure during the upgrade process (patching). The ULS looked like the below.

Install-SPService yielded the same error. Looking at the code for the GetSessionStateModification method, it simply sets some web.config values based on property values from the Session State Service object.

Basic stuff, right? So why was I getting these ULS errors? Using PowerShell, I found that Session State was enabled, which is OK.

But you’ll see that, while session state is enabled, it has no value for any of the other fields besides the timeout value. This is what caused my exception as the method, GetSessionStateModification, expected that those properties would be populated. The fix? Disable session state (or $ss.SessionStateEnabled = $false;$ss.Update() appended to the above PowerShell). After that, the farm upgraded just fine.


  1. Hi Trevor, which ULS log messages did you get?

Leave a Reply