Click here to Skip to main content
Click here to Skip to main content

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

By , 7 Jul 2006
Rate this:
Please Sign up or sign in to vote.

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)

About the Author

dameron22

United States United States
No Biography provided

Comments and Discussions

 
GeneralMy vote of 1 Pinmemberbabakzawari27-Jan-10 22:20 
GeneralYou didn't google very well... Pinmembereggsovereasy7-Jul-06 9:09 
GeneralRe: You didn't google very well... [modified] Pinmemberdameron227-Jul-06 10:29 
Sorry about that... I guess it doesn't hurt to have 2 articles online about the same thing Smile | :)
 
Like that has never happened.............
 
-- modified at 16:30 Friday 7th July, 2006

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

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

| Advertise | Privacy | Mobile
Web04 | 2.8.140421.2 | Last Updated 7 Jul 2006
Article Copyright 2006 by dameron22
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid