gpt4 book ai didi

ASP.NET Membership 获取用户登录失败的次数

转载 作者:行者123 更新时间:2023-12-02 11:04:54 25 4
gpt4 key购买 nike

我的 web.config 允许最多 10 次密码尝试失败。但我想在 5 次失败后添加验证码。

我如何获得成员(member)资格甚至自定义函数的失败尝试次数?

最佳答案

此资源在这里 http://p2p.wrox.com/book-professional-asp-net-2-0-security-membership-role-management-isbn-978-0-7645-9698-8/39682-failed-login-attempts-counts.html声明它不能直接通过 api 完成,必须通过单独的 sql 调用来完成。引用以下文章:

We don't expose this information directly in the API. However, you can query the database and select the user's row from the vw_aspnet_MembershipUsers view. Then look at the FailedPasswordAttemptCount column to get the current number of failed attempts.

-Stefan Author: Professional ASP.NET 2.0 Security, Membership, and Role Management

关于ASP.NET Membership 获取用户登录失败的次数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11988398/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com