密码不正确或新密码无效

时间:2015-02-26 18:02:38

标签: c# asp.net authentication asp.net-membership change-password

更改密码控制经常无法进行更改尝试。

控制非常简单

<asp:ChangePassword ID="ChangePassword1" Runat="server"
 BorderStyle="Solid" 
 BorderWidth="1" 
 CancelDestinationPageUrl="~/Default.aspx" 
 DisplayUserName="true" 
 ContinueDestinationPageUrl="~/Default.aspx" >
</asp:ChangePassword>

错误消息始终相同

Password incorrect or New Password invalid. New Password length minimum: 4. Non-alphanumeric characters required: 0.

当我的用户登录Membership.ValidateUser时,我成功登录。

 e.Authenticated = Membership.ValidateUser(userEmail, lgnLogin.Password);
 if (e.Authenticated)
 {
    //I am getting into this area for re-direct
 }

任何人都可以澄清可能导致这种情况的原因吗?

*************编辑2015年2月27日********* 以下是web.config成员资格信息。

 <authentication mode="Forms">
      <forms defaultUrl="~/Default.aspx" loginUrl="~/Default.aspx"  name=".ASPXFORMSAUTH" />
    </authentication>
    <membership defaultProvider="MembershipProvider">
      <providers>
        <remove name="AspNetSqlMembershipProvider" />
        <add name="MembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="AuthDBConnection" applicationName="Application" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="15" minRequiredPasswordLength="4" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" />
        <!--<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="4" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />-->
      </providers>
    </membership>

0 个答案:

没有答案