title: Unable to use session state server because this version of ASP.NET requires session state server version 2.0 or above
body: <p>I am migrating 2 .NET web sites from one Windows 2003 (IIS6) server to another. One of the sites is .NET 2.0 and the other is .NET 3.5. I am using the StateServer mode of ASP.NET session state with the following settings in the global web.config file (in the C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\ directory). The session state is working fine on the old server.</p>
  
  <pre><code>&lt;sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424"/&gt;
  </code></pre>
  
  <p>However, after installing .NET 2.0 and the .NET 3.5 SP1 framework from <a href="http://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe" rel="nofollow">here</a>, I am getting the following error message the first time (every time) after a server restart, session timeout, or application pool refresh.</p>
  
  <blockquote>
    <p>Unable to use session state server because this version of ASP.NET
    requires session state server version
        2.0 or above.[ at System.Web.SessionState.OutOfProcSessionStateStore.MakeRequest(StateProtocolVerb
    verb, String id,
    StateProtocolExclusive
    exclusiveAccess, Int32 extraFlags,
    Int32 timeout, Int32 lockCookie,
    Byte[] buf, Int32 cb, Int32
    networkTimeout,
    SessionNDMakeRequestResults&amp; results)
    at
    System.Web.SessionState.OutOfProcSessionStateStore.SetAndReleaseItemExclusive(HttpContext
    context, String id,
    SessionStateStoreData item, Object
    lockId, Boolean newItem) at
    System.Web.SessionState.SessionStateModule.OnReleaseState(Object
    source, EventArgs eventArgs) at
    System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    at
    System.Web.HttpApplication.ExecuteStep(IExecutionStep
    step, Boolean&amp; completedSynchronously)
    ]</p>
  </blockquote>
  
  <p>I found 2 other posts with similar symptoms, however neither of them provided a solution that worked.</p>
  
  <ol>
  <li><a href="http://forums.asp.net/t/1377185.aspx/1" rel="nofollow">Unable to use session state server....requires session state server version 2.0 or above.</a></li>
  <li><a href="http://blogs.msdn.com/b/tom/archive/2008/07/14/unable-to-use-session-state-server.aspx" rel="nofollow">Unable to use Session State Server</a></li>
  </ol>
  
  <p>So far, I have tried:</p>
  
  <ol>
  <li>Using aspnet_regiis -ua followed by aspnet_regiis -i -enable</li>
  <li>Uninstalling and reinstalling .NET 3.5 SP1 and .NET 2.0</li>
  <li>Explicitly setting the httpRuntime enableVersionHeader attribute to true</li>
  </ol>
  
  <p>Note I have also set up the MachineKey attribute in each application's web.config file as outlined in <a href="http://support.microsoft.com/kb/313091" rel="nofollow">this MSDN article</a>. This is something I had working on the old server that was copied over exactly the same as it was previously.</p>
  
  <p>I noticed that when I had only .NET 2.0 installed the problem went away completely. It only appeared after I installed .NET 3.5 SP1. Unfortunately, one of the applications depends on .NET 3.5 for some of its functionality so leaving it uninstalled is not an option.</p>
  
  <p>Any ideas how I can diagnose and fix this issue?</p>