我正在将2个.NET网站从一台Windows 2003(IIS6)服务器迁移到另一台。其中一个网站是.NET 2.0,另一个是.NET 3.5。我在全局web.config文件(在C:\ Windows \ Microsoft.NET \ Framework \ v2.0.50727 \ CONFIG \目录下)中使用了ASP.NET会话状态的StateServer模式。会话状态在旧服务器上正常工作。无法使用会话状态服务器,因为此版本的ASP.NET需要会话状态服务器2.0或更高版本
<sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424"/>
然而,从here安装.NET 2.0和.NET 3.5 SP1框架后,我在服务器重新启动后收到以下错误消息在第一时间(每次),会话超时,或应用程序池刷新。
无法使用会话状态服务器,因为此版本ASP.NET 的需要会话状态服务器版本 2.0以上。[在System.Web.SessionState.OutOfProcSessionStateStore.MakeRequest(StateProtocolVerb 动词,串ID, StateProtocolExclusive exclusiveAccess,的Int32 extraFlags, 的Int32超时,的Int32 lockCookie, 字节[] buf中,CB的Int32,的Int32 networkTimeout, SessionNDMakeRequestResults &结果) 在 System.Web.SessionState.OutOfProcSessio nStateStore.SetAndReleaseItemExclusive(HttpContext的 上下文中,串ID, SessionStateStoreData项,对象 lockId,布尔的newitem)在 System.Web.SessionState.SessionStateModule.OnReleaseState(对象 源,EventArgs的EventArgs的)在 System.Web.HttpApplication.SyncEventExecutionStep .System.Web.HttpApplication.IExecutionStep.Execute() 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep 步骤,布尔& completedSynchronously) ]
我发现的其它2个职位具有类似症状,但是他们都没有提供有效的解决方案。
- Unable to use session state server....requires session state server version 2.0 or above.
- Unable to use Session State Server
到目前为止,我曾尝试:
- 使用ASPNET_REGIIS -ua其次ASPNET_REGIIS -i -enable
- 卸载并重新安装.NET 3.5 SP1和.NET 2.0
- 显式在的httpRuntime enableVersionHeader属性itly设置为true
注意我还设置了在每个应用程序的web.config文件中的machineKey属性为this MSDN article概述。这是我在旧服务器上工作的东西,与以前完全相同。
我注意到,当我只安装.NET 2.0时,问题完全消失。它只在我安装.NET 3.5 SP1后出现。不幸的是,其中一个应用程序依赖于.NET 3.5的一些功能,因此不要将其卸载。
任何想法如何诊断和解决此问题?