多个用户同时分配相同的会话 ID
我看到多个用户登录到我的 .NET 3.5 Web 应用程序并共享相同的会话 ID。当用户位于同一网络上的不同计算机上时,这种情况似乎最常发生,但不同网络上的用户之间似乎也会发生这种情况。我的用户在一分钟内登录并获得相同的会话 ID。因此,用户 B 正在查看用户 A 的数据。
我们在 Server 2003 R2 机器上使用多个工作进程。会话和视图状态存储在 SQL Server 中。会话设置为使用 cookie 而不是 URL 来存储 ID。
这个问题与这些问题类似,但都不符合我的情况:
这个使用了IIS7<--特别是看起来像这个,但我使用的是 IIS 6,它不使用动态输出缓存,对吧?
为什么我的应用程序将相同的会话 ID 分配给不同的计算机?我怎样才能阻止它发生?
编辑:我非常怀疑会话是罪魁祸首,但我的同事们比我更重要。更有可能存在代码问题,但我无法解释为什么我们正在记录的会话 ID 是相同的。是的,日志记录代码可能存在问题,但这并不能解释为什么用户 B 正在获取用户 A 存储的会话数据。
I'm seeing multiple users logging in to my .NET 3.5 web application and sharing the same session ID. This appears to be happening most often when users are on different computers on the same network, but it appears to be happening between users on different networks as well. My users are logging in within a minute of each other and getting the same session ID. Consequently, user B is seeing user A's data.
We are using multiple worker processes on the Server 2003 R2 box. Session AND viewstate are stored in SQL Server. Session is set up to use cookies, not URL, to store the ID.
This question is similar to these questions, but neither matches my scenario:
This one turned out to be a false report
This one used IIS7 <--It particularly looks like this one, but I'm on IIS 6, which does NOT use dynamic output caching, right?
Why is my application assigning the same session ID to different machines? How can I stop it from happening?
Edit: I am highly skeptical that session is the culprit, but I am being outweighed by my colleagues. It is more likely that there is a code problem, but I can't explain why the session IDs that we are logging are identical. Yes, there could be a problem with the logging code, but that wouldn't explain why user B is getting user A's stored session data.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否有任何静态代码(在 vb.net 中共享)。这可能会导致问题。此外,在会话中实际存储某些内容之前,会话并未真正初始化。
Do you have any code that is static (shared in vb.net). This could cause the problem. Also, Session is not truly initialized until something is actually stored in session.