Click here to Skip to main content
Click here to Skip to main content
Go to top

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

, 7 Jul 2006
Rate this:
Please Sign up or sign in to vote.
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)

Share

About the Author

dameron22

United States United States
No Biography provided

Comments and Discussions

 
GeneralMy vote of 1 Pinmemberbabakzawari27-Jan-10 22:20 

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.140922.1 | Last Updated 7 Jul 2006
Article Copyright 2006 by dameron22
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid