We have an application that runs over load balanced server instances, and therefore is configured to use the ASP.NET session state service, which is running on one of our DB servers. While both instances of our app can successfully connect to the state server, changes in session state data are not being reflected across both of them. FI, If I call Session.Add('SomeKey', SomeData)
on Server A, this is not being reflected if I then try to access Session['SomeKey']
on Server B.
我们有一个运行在负载平衡服务器实例上的应用程序,因此配置为使用在我们的一个数据库服务器上运行的ASP.NET会话状态服务。虽然我们的应用程序的两个实例都可以成功连接到状态服务器,但会话状态数据的更改不会反映在它们中。 FI,如果我在服务器A上调用Session.Add('SomeKey',SomeData),如果我然后尝试访问服务器B上的Session ['SomeKey'],则不会反映这一点。
Session.SessionID returns the same value on both servers, and I have checked that they are both using the same validationkey and decryptionkey values configured in the machinekey section of machine.config. I even tried specifying these values in the apps web.config.
Session.SessionID在两个服务器上返回相同的值,并且我已检查它们是否都使用在machine.config的machinekey部分中配置的相同validationkey和decryptionkey值。我甚至尝试在应用程序web.config中指定这些值。
What other things should I be looking out for which may be causing these symptoms, and what steps can people recommend to help debug this issue?
我应该注意哪些可能导致这些症状的其他事项,以及人们可以推荐哪些步骤来帮助调试此问题?
2 个解决方案
#1
Does this help:
这有用吗:
http://support.microsoft.com/kb/325056 ?
To maintain session state across different Web servers in the Web farm, the application path of the Web site (for example, \LM\W3SVC\2) in the Microsoft Internet Information Services (IIS) metabase must be the same for all of the Web servers in the Web farm. The case also needs to be the same because the application path is case-sensitive.
要在Web场中的不同Web服务器之间维护会话状态,Microsoft Internet信息服务(IIS)元数据库中的Web站点(例如,\ LM \ W3SVC \ 2)的应用程序路径必须对于所有Web都相同Web场中的服务器。案例也需要相同,因为应用程序路径区分大小写。
#2
I ended up using iiscnfg /copy to perform a full copy of the IIS metabase from one server to the other, and that resolved the problem. Thanks to E.J Brennan for putting me on the road to glory.
我最终使用iiscnfg / copy从一个服务器到另一个服务器执行IIS元数据库的完整副本,这解决了问题。感谢E.J Brennan让我走上荣耀之路。
#1
Does this help:
这有用吗:
http://support.microsoft.com/kb/325056 ?
To maintain session state across different Web servers in the Web farm, the application path of the Web site (for example, \LM\W3SVC\2) in the Microsoft Internet Information Services (IIS) metabase must be the same for all of the Web servers in the Web farm. The case also needs to be the same because the application path is case-sensitive.
要在Web场中的不同Web服务器之间维护会话状态,Microsoft Internet信息服务(IIS)元数据库中的Web站点(例如,\ LM \ W3SVC \ 2)的应用程序路径必须对于所有Web都相同Web场中的服务器。案例也需要相同,因为应用程序路径区分大小写。
#2
I ended up using iiscnfg /copy to perform a full copy of the IIS metabase from one server to the other, and that resolved the problem. Thanks to E.J Brennan for putting me on the road to glory.
我最终使用iiscnfg / copy从一个服务器到另一个服务器执行IIS元数据库的完整副本,这解决了问题。感谢E.J Brennan让我走上荣耀之路。