Click here to Skip to main content
15,179,246 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a custom MembershipProvider based on this example[^] from msdn.

I defined the minRequiredPasswordLength and minRequiredNonAlphanumericCharacters in my web.config like this:

XML
<membership defaultProvider="CustomMembershipProvider">
  <providers>
    <clear/>
    <add name="CustomMembershipProvider"
         type="CustomProviders.CustomMembershipProvider"
         connectionStringName="CustomDB"
         enablePasswordRetrieval="false"
         enablePasswordReset="true"
         requiresQuestionAndAnswer="false"
         writeExceptionsToEventLog="true"
         requiresUniqueEmail="false"
         passwordFormat="Hashed"
         minRequiredPasswordLength="8"
         minRequiredNonAlphanumericCharacters="2"
         maxInvalidPasswordAttempts="5"
         passwordAttemptWindow="10"
         />
  </providers>
</membership>


But when I try to change the password of the current user using the ChangePassword control or when I create a new user using the CreateUserWizard control, the Membership does not perform any validation over the new password, this means, both controls allow me introduce a new password like abc.

Does the Membership validate automatically the password?
I need to hand-code the password validation methods or there are something wrong with my code?
Posted

1 solution

I found the solution here[^].
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900