使用WCF会话管理维护登录尝试错误计数 [英] Maintain Login Attempt error count using WCF Session Management

查看:116
本文介绍了使用WCF会话管理维护登录尝试错误计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,





你们可以指导我如何使用重置维护每个用户/每个浏览器的登录尝试错误计数使用WCF会话管理。





谢谢

Supriya P

Hi All,


Can u guys guide me on How to maintain login attempt error count per user/per browser using reset to 0. using WCF session mangements.


Thanks
Supriya P

推荐答案

请记住,网络是无国籍的。您的服务器可能在成功登录之前没有启动会话 - 因此您甚至不会有(Web服务器)会话状态来存储登录尝试次数。



您想要计算登录尝试次数:您认为来自同一来源的登录尝试的位置是什么?只是用户ID进行尝试?只是浏览器?两者结合?无论你选择什么,我建议使用一些持久存储(可能是数据库)键入浏览器IP地址(加上尝试的登录ID,如果你选择)来记录当前的尝试次数(可能还有日期和时间)最后的尝试)。



当然,你可能会做一些完全不同的事情,也许是已经开放的WCF会话(因此,你有一个网络会话),在这种情况下,您的选择是不同的。但是,您没有在问题中提供足够的信息,以便我们了解您如何使用WCF(这是一种高度适应性和可配置的技术) - 因此很难提供有针对性的建议。
Remember, the web is stateless. Your server will probably not have initiated a session prior to a succesful login - so you won't even have (web server) session state in which to store a count of login attempts.

You are wanting to count login attempts: what is the locus of a login attempt that you consider to be from the same source? Just the user Id making the attempt? Just the browser? Combination of both? Whatever you choose, I'd recommend using some persistent store (probably a database) keyed off the browser IP address (plus the login ID attempted, if you choose) to record the current number of attempts (and, perhaps, the date & time of the last attempt).

Of course, you may be doing something entirely different, perhaps with an already open WCF session (and, therefore, you have a web session), in which case your options are different. But, you don't provide enough information in your question for us to understand how you are using WCF (which is a highly adaptable and configurable technology) - so it's hard to provide well targeted suggestions.


这篇关于使用WCF会话管理维护登录尝试错误计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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