AspNetMembershipProvider登录尝试消息

时间:2017-04-20 11:10:04

标签: asp.net

我正在尝试向我的登录屏幕添加一个标签,该标签表明用户在提交3次失败尝试后被锁定。目前,如果用户输入的密码不正确,则会显示以下错误:

  

您的登录尝试失败。请再试一次。

一旦密码输入错误3次,帐户就会被锁定,这就是我想要的,但是这条消息保持不变并且不会改变。

如何将此更改为另一条消息,指出用户已被锁定?

据我所知,我的login.aspx文件中调用了failureNotification类,该文件返回上述消息。

<div style="margin-bottom: 10px;" class="logInBtn">
<asp:Button ID="LoginButton" runat="server" CommandName="Login" ValidationGroup="LoginUserValidationGroup" Text="LOG IN" Width="112" Height="38" CssClass="buttonStyle" />
</div>

<span class="failureNotification">
<asp:Literal ID="FailureText" runat="server" />
</span>
<asp:ValidationSummary ID="LoginUserValidationSummary" runat="server" ValidationGroup="LoginUserValidationGroup" />

如果需要更多信息,请告诉我,这不是我的专业领域,如果遗漏任何重要信息,请致歉

来自Web.config的

AspNetMembershipProvider专线:

<add name="AspNetMembershipProvider"
 type="System.Web.Security.SqlMembershipProvider" 
 connectionStringName="_IntrinsicData"
 applicationName="MYAPPLICATION" 
 requiresUniqueEmail="false"
 requiresQuestionAndAnswer="false" 
 minRequiredNonalphanumericCharacters="0" 
 minRequiredPasswordLength="5" 
maxInvalidPasswordAttempts="3" />
单击按钮时

,它只会打开aspx文件:

enter image description here

0 个答案:

没有答案
相关问题