保护ASP.NET应用程序使用限制登录次数 [英] Secure an ASP.NET Application Using limit for number of logins

查看:170
本文介绍了保护ASP.NET应用程序使用限制登录次数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到一个解决方案来控制asp.net应用程序登录的次数。
我需要安装在客户端服务器应用程序,和设置许可证的数量。例如只有10个用户被允许访问的应用程序。

I am trying to find a solution to control the number of logins on asp.net application. I need to install the application in the client server, and set the number of licences. e.g. only 10 users are allowed to access the app.

每当有人试图登录我需要检查有多少用户已登录,允许带那么总比较授权用户才能继续。

Every time someone tries to login I need to check how many user are logged in, compare with the total allowed then authorize that user to proceed.

我试图与证书,但我看不出哪里的记录数与允许的用户的最大数量相匹配的用户。

I tried with Certificate, but I couldn't see where to match the number of logged in users with the max number of allowed user.

此外,我想用IP地址作为识别码,那么如果我打开3浏览器窗口,它只有一个用户登录数。

Also I would like to use the IP address as identifier, then if I open 3 browser windows, it count only one user logged.

基本上这个Web应用程序将被许可进行销售。我们需要控制每台计算机的登录,而不是每个用户,登录块,如果登录的极限为止。

Basically this web application will be sold by licences. We need to control the logins per computer, and not per user, and block logins if the limit of logins are reached.

请原谅我,如果我不与描述清楚。

Please forgive me, if i am not clear with the description.

感谢您的帮助。

推荐答案

我会使用的SessionID在Session对象为重点,我想存储的用户名进行登录的用户在数据库或某种沿的后备存储。我会使用Session_End中在Global.asax删除记录上述任何一届会议即将过期,并在任何注销功能删除它们。你应该觉得很简单,算你有,并确认它不是在同一个用户登录一次,如果这是允许的活动会话的数量。

I would use the SessionID in the Session object as the key, I'd store that along with the UserID for the logged in user in a database or some kind of backing store. I'd use Session_End in the global.asax to remove the records above for any session expiring and also remove them in any logout function. You should find it fairly simple to count the number of active sessions you have and confirm that it's not the same user logging in again, if that's allowed.

这篇关于保护ASP.NET应用程序使用限制登录次数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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