Click here to Skip to main content
15,867,308 members
Articles / Web Development / ASP.NET

Turn off Required Nonalphanumeric Characters in Membership and Roles with ASP.NET 2.0

Rate me:
Please Sign up or sign in to vote.
2.33/5 (5 votes)
7 Jul 2006CPOL 26K   12   3
An article on Membership and Roles

Introduction

Quick tutorial on one of the coolest features in ASP.NET 2.0. I have found that if you are using the CreateUserWizard in VS 2005 by default it makes you use the Nonalphanumeric Characters in the password field. Well if your like me this little validator can piss you off in a hurry, so here is the fix for that.

Using the Code

In the Web.config under <roleManager enabled="true"/> put this next snippet in:

<membership defaultProvider="AspNetSqlMembershipProvider" 
    userIsOnlineTimeWindow="15" hashAlgorithmType="">
<providers>
<clear/><CODE> 

<add connectionStringName="LocalSqlServer"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
applicationName="/"
requiresUniqueEmail="false"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
passwordAttemptWindow="10"
passwordStrengthRegularExpression=""
minRequiredPasswordLength="1"
minRequiredNonalphanumericCharacters="0"
name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</membership>

I hope this can help someone else out. I have searched all over google.com and have found nothing about turning off the Nonalphanumeric validator.

License

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


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 1 Pin
babakzawari27-Jan-10 22:20
babakzawari27-Jan-10 22:20 
GeneralYou didn't google very well... Pin
eggsovereasy7-Jul-06 9:09
eggsovereasy7-Jul-06 9:09 
GeneralRe: You didn't google very well... [modified] Pin
dameron227-Jul-06 10:29
dameron227-Jul-06 10:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.