asp.net mvc 会话状态..有帮助吗?
有没有人经历过会话在应用程序范围内共享?
我的 MVC 应用程序具有普通设置,但由于某种原因,我的会话正在共享。
我并没有真正想过什么时候我可以在 FF 和 IE 之间切换并保持登录状态,但现在,我注意到我也可以切换机器。
我的 web.config 没有任何内容来设置会话状态,所以我假设它是基于 cookie 的,但看起来并非如此。
以前有人经历过这种情况吗?如果有,你是如何解决的?
仅供参考:我在 Server 2003 IIS6 上运行它。
谢谢大家!!
加夫
Has anyone ever eperienced session's being shared application wide?
My MVC application has the vanilla setup but for some reason, my sessions are being shared.
I didn't really think about it when I could switch between FF and IE and maintain a logged in state but now, I've noticed that I can switch machines too.
My web.config doesn't have anything in to setup the session state, so I assumed it was cookie based but it seem it's not.
Has anyone ever experienced this before and if so, how did you resolve it?
FYI: I'm running it on Server 2003 IIS6.
Thanks all!!
Gav
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否专门在 Session 中使用存储内容,或者您是否在 TempData 调用(也暂时使用会话)中看到这一点?
Are you specifically using storing things in Session or are you seeing this in TempData calls (which temporarily uses session as well)?
你相信吗...愚蠢的静态变量...
我认为通过使用静态私有变量,它可以帮助我在获取数据时不做太多工作,但看起来,这是邪恶的根源。 (邪恶博士小指)
谢谢大家!
** 注意这不是!去做 **
Well would you believe it... Stupid static variables...
I thought by using a static private variable that it would help me by not doing as much work when getting the data, but as it seems, it was the root of evil. (doctor evil pinky)
Thanks everyone!
** NOTE THIS IS HOW NOT!! TO DO IT **