如何处理在ASP.NET,VB.NET这个环节的问题? [英] How to tackle this session problem in ASP.NET,VB.NET?

查看:109
本文介绍了如何处理在ASP.NET,VB.NET这个环节的问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在ASP.NET中处理这个会议的问题,VB.NET?

How to tackle this session problem in ASP.NET,VB.NET?

下面的要求是有:

当授权用户登录到该用户不允许从另一台计算机或在不同的浏览器比其他用户登录是使用权利此时系统

When the authorized user logs into the system that user is not allowed to login from another computer or in different browser other than that user is using right at this time.

我们采用的补救办法是:我们已经把Is_Loggedin为数据类型为位在mst_vendor作为表名的列。当在我们用户登录设置标志,Is_Loggedin,为1,并每当有人试图登录在使用​​该帐户时,系统被示出已登录用户被中。的错误

The remedy we applied was: We have kept "Is_Loggedin" as a column with data type "bit" in a mst_vendor as a table name. When a user logs in we set the flag, Is_Loggedin, to "1" and each time when someone tries to log in using this account, the system is showing the error "The user is already logged in.".

当用户注销其变为0作为退出的程序,用户点击注销按钮立即调用。

When the user logs out it turns to "0" as the logout procedure calls as soon as the user clicks the log out button.

问题场景:

  1. 当用户关闭标志保持相同的浏览器,也就是,1

  1. When the user closes the browser the flag remains the same, that is, "1".

在电源下车,它仍然是一样的1。

When power gets off, it remains the same as "1".

如果一个predefined值时,它保持不变后,会话超时。

If the session timeouts after a predefined value it remains the same.

可以存在除此之外的不同的方案。

There may be different scenarios other than this.

有没有什么办法,使我们可以使用应用程序对象存储这个内部萎靡,为用户的登录状态?

Is there any way so that we can store this internal flagging for the user's login status using the application object?

有可能提高系统的效率,并还消除了上述问题的方案。

It may improve efficiency of the system and also eliminates the above problematic scenarios.

推荐答案

您应该使用的Global.asax 文件,并使用 Session_End中的功能。

You should use the Global.asax file and use the Session_End function.

Session_End中:<一href="https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-5771721.html"相对=nofollow>当用户的会话超时,结束或他们离开应用程序网站触发。

Session_End: Fired when a user's session times out, ends, or they leave the application Web site.

这篇关于如何处理在ASP.NET,VB.NET这个环节的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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