不同登录用户之间的会话冲突 [英] Session Conflicts between different logined users

查看:416
本文介绍了不同登录用户之间的会话冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当我从一个用户凭据登录到我的应用程序时,它将使用另一个用户的凭据登录到该应用程序,并显示欢迎另一个用户"的名称.此问题发生在生产服务器上,而在开发服务器中,代码运行正常.

问题发生在不同的计算机上,例如用户A在计算机A上是loggon,用户B在计算机B上是loggon.登录时,请参阅欢迎用户B.

我试图调查这个问题,多数情况下我在使用会话并在单击注销时放弃了会话,而我还没有使用缓存对象,因此应用程序逻辑似乎还不错.

我们已经将ADO.NET实体框架4.0与WCF服务一起使用.
任何人都可以建议发生此问题的可能性.



谢谢.

Hi,

When i login to my application from one users credential, it gets logined to the application with another user''s credential and shows Welcome Another user''s name.This issue is occuring on production server whereas in development server the code works fine.

The issue occurs in different machine say user A is loggon onmachine A and User B is loggon on Machine B.The User A, when loggined see Welcome user B.

I tried to look into the issue, most the places I am using session and abandoning the session on logout''s click,whereas I have not used cache object and the application logic seems to be fine.

We have used ADO.NET entity framework 4.0 with WCF service.

Can anybody suggest the possibilities why this issue is occuring.



Thanks.

推荐答案

没有确定的详细信息就不可能说,但我的猜测是您将当前登录的用户"存储在静态或全局作用域(例如,作为静态属性或静态字典中的条目),而不是在会话中.您需要将当前用户存储在会话中(即在Session ["some string"]中).

如果您将成员资格与自定义成员资格提供程序一起使用,请确保您也没有在静态范围内在提供程序中执行任何操作.
It''s impossible to say without more detail for sure, but my guess is that you are storing the ''currently logged in user'' in a static or global scope (i.e. as a static property or an entry in a static dictionary), instead of in the session. You need to store the current user in the session (i.e. in Session["some string"]).

If you are using Membership with a custom membership provider, make sure that you aren''t doing anything in the provider in a static scope, either.


这篇关于不同登录用户之间的会话冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆