How to set less restrive passwords for the CreateUserWizard control?

  • Thread starter Thread starter Ron
  • Start date Start date
R

Ron

I am using the CreateUserWizard control in my asp.net2.0 app.
For my needs the enforced password strenght is to strong; I want to
allow users to be able to create
passwords with only text and not force them to use a non-alfanumeric
character as well as a digit.

Setting the EmailRegularExpression property to a less restrictive
regular expression doesn't work because the password is evaluated FIRST
by the membership provider before it's evaluated by the control. Now I
want o change the regular expression used by the membership provider
but I can't see how. All MembershipProvider password related properties
are ReadOnly.

How can I set change the default membershipprovider password regular
expression in order to allow weaker passwords?

Ronald van Aalten
 
You need to configure the Membership provider in your web.config file.
The passwordStrengthRegularExpression property seems like the obvious
solution, but unfortunately, it is not.

The properties you care about are:
minRequiredPasswordLength
minRequiredNonalphanumericCharacters

Example:
<membership defaultProvider="YourSqlProvider">
<providers>
<add
name="YourSqlProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="SqlServices"
minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0"
/>
</providers>
</membership>


Joshua Flanagan
http://flimflan.com/blog
 
Back
Top