如何避免ASP.NET应用程序在同一系统的不同选项卡中打开相同的浏览器 [英] how to avoid asp.net application open same browser in different tabs in same system

查看:71
本文介绍了如何避免ASP.NET应用程序在同一系统的不同选项卡中打开相同的浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,


我正在我的应用程序3模块中使用Web应用程序. 1.管理员2.客户3.特许经营.首先,我以系统管理员身份在系统firefox浏览器中登录,但没有注销管理员.经过10次minit后,我尝试以客户端身份登录同一浏览器(firefox)相同系统
客户端还应如何避免这2个模块无法在同一浏览器中登录?如何解决此问题,请帮帮我

感谢和问候

srinivas

Dear All,


i am working web application in my application 3 modules . 1.admin 2. client 3. franchise. first i login as a admin in my system firefox browser i didnot logout admin . after 10 minits i trying to login as client same browser (firefox) same system
client also how to avoid this 2 modules canot login in same browser how to resolve this please help me

thanks and regards

srinivas

推荐答案

我认为这是不可能的. [
I don''t think it is possible. This[^] post suggests some solutions, but they all sound hacky to me. Why would you care ?


通常,这是不可能的–您无法判断用户是否关闭了上一个选项卡.如果该网站位于登录名后,则您可以使同一用户在登录时使以前的会话无效,因此他们不能一次在两个不同的浏览器中对其进行操作,尽管在执行此操作之前应格外谨慎,因为这样做通常会很大用户的烦恼(如果他们想打开两个会话,则可能有充分的理由).

对于多步骤事务,您应该将瞬态信息存储在页面中,或者存储在以页面中而非会话中存储的内容为键的数据库条目中.您可以通过检查是否已经打开任何交易来防止此类交易被再次输入,但是如果您这样做,则必须非常小心进行清理,因为如果用户收到通知,则不会收到通知.的浏览器关闭,如果您不清除过去的交易记录,它们将永远无法启动新的交易.同样,除非有非常充分的理由,否则您不应一次一次只执行一项事务.如果用户想一次做两件事,则应该让他.
In general, this is not possible – you can''t tell whether the user has closed a previous tab or not. If the site is behind a login, you can invalidate previous sessions by the same user on login, so they can''t operate it in two different browsers at once, though you should think extremely carefully before doing this as it is generally a big annoyance for the user (if they want to open two sessions there is probably a good reason for that).

For multi-step transactions you should store the transient information in the page, or in a database entry keyed by something stored in the page, not in the session. You can protect such transactions from being double-entered by checking if there are any already open, but if you do this you must be extremely careful with cleanup since you won''t get a notification if the user''s browser closes and if you don''t clean up past transaction entries they will never be able to start a new transaction. Again, you should not enforce only one transaction at a time unless there is a very good reason; if the user wants to do two things at once you should let him.


这篇关于如何避免ASP.NET应用程序在同一系统的不同选项卡中打开相同的浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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