简体   繁体   English

负载平衡环境中的ASP.net状态服务器丢失会话

[英]ASP.net State Server losing session in load balanced environment

I am aware that this is a commonly asked question but I have yet to find anything that answers my question. 我知道这是一个常见问题,但是我还没有找到任何可以回答我问题的东西。 I am randomly losing session data in a load balanced environment. 我在负载平衡的环境中随机丢失了会话数据。 I have done the following: 我已经完成以下工作:

  • Set all the servers to the same state server 将所有服务器设置为同一状态服务器
  • Ensured that all the machineKeys in the web.config are the same 确保web.config中的所有machineKeys都相同
  • Ensured that all the machineKeys in the machine.config are the same 确保machine.config中的所有machineKeys都相同
  • Ensured that all the paths to the web service files are the same (case sensitive) 确保Web服务文件的所有路径都相同(区分大小写)
  • Made sure that the services all have the same ID 确保所有服务具有相同的ID

The session simply will not persist over multiple web servers. 会话根本不会在多个Web服务器上持续存在。 The following is the web.config session information: 以下是web.config会话信息:

    <sessionState cookieless="UseCookies" mode="StateServer" stateConnectionString="tcpip=[ipAddress]:42424" stateNetworkTimeout="30" timeout="60" />

Any ideas? 有任何想法吗? I am out of them. 我没了 Thanks! 谢谢!

I've been told it's not possible to persist session data in a multi-server environment unless you use a SQL Server instance to store it...I'm assuming you're familiar with it but here's a link for others who may not be: 有人告诉我,除非您使用SQL Server实例存储会话数据,否则就无法在多服务器环境中持久保存会话数据...我假设您已熟悉它,但这是其他人的链接是:

http://support.microsoft.com/kb/317604 http://support.microsoft.com/kb/317604

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM