SQL Server会话状态问题

发布于 2024-08-08 13:12:54 字数 391 浏览 2 评论 0原文

我正在开发一个购物车网站。

问题是,当我将产品添加到我的购物车并且另一台计算机中的另一个用户浏览购物车时,突然有了我的购物车详细信息!

我们的网站位于网络场中,因此会话状态保存在 Sql Server 中。 这是我第一次在 Sql Server 上设置 SessionState。

在我的 web.config 中有这个,

<sessionState
mode="SQLServer"
sqlConnectionString="data source=someip;user=someuser;password=somepassword"
cookieless="false"
timeout="20" />

我错过了什么吗?非常感谢帮助。

I am developing a shopping cart website.

The problem is, when I add product items to my shopping cart and another user in another computer browses the shopping cart, suddenly has my cart details!!.

We have our site on a web farm, hence session state is held in Sql Server.
This is the first time I am setting up SessionState on Sql Server.

In my web.config I have this,

<sessionState
mode="SQLServer"
sqlConnectionString="data source=someip;user=someuser;password=somepassword"
cookieless="false"
timeout="20" />

Am I missing any thing? Help much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

逆流 2024-08-15 13:12:54

会话状态是基于每个浏览器实例进行处理的,无论是否是 InProc。您还有其他问题正在发生。

Session state is handled on a per browser instance basis whether InProc or not. You have some other issue going on.

不忘初心 2024-08-15 13:12:54

尼尔和里克,感谢您的回复。
问题不在于会话状态。这是一个静态类,存储的值正在移动并导致这种混乱。

Neil and rick, thanks for your response.
The problem was not in session state. It was a static class stored with values was moving around and causing this confusion.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文