Victor Athoti.
Victor Athoti.

Reputation: 831

How to create a Membership in asp.net

I have create a asp membership in asp.net it is working fine .But,when i try to to register a new member password will not accept without a special Character ,how can solve this problem please help me........

 <providers>
      <clear/>
           <remove name="AspNetSqlMembershipProvider"/>
           <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web,Version=2.0.0.0, 
     Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="Mybusinessconnection" requiresQuestionAndAnswer="false"  
   applicationName="MyBusinessApp" requiresUniqueEmail="false" 
   maxInvalidPasswordAttempts="3" minRequiredPasswordLength="4"/>
 </providers>
 </membership>

This is what i'm using for membership...

Upvotes: 0

Views: 778

Answers (2)

Tim Schmelter
Tim Schmelter

Reputation: 460268

You can handle this with the Membership's MinRequiredNonAlphanumericCharacters property.

<membership defaultProvider="SqlProvider"
  userIsOnlineTimeWindow = "20>
  <providers>
    <add
      name="SqlProvider"
      type="System.Web.Security.SqlMembershipProvider"
      connectionStringName="SqlServices"
      requiresQuestionAndAnswer="true"
      minRequiredNonalphanumericCharacters="0"
      />
  </providers>
</membership>
  • Important note: Microsoft itself spelled it wrong, it's case sensitive and must be spelled minRequiredNonalphanumericCharacters(changed it above). Someone mentioned this as comment below.

Upvotes: 6

Ash Clarke
Ash Clarke

Reputation: 4887

This thread should help you: http://forums.asp.net/t/1285512.aspx/1

You need to create a custom Membership Provider in your web.config and set the minRequiredNonalphanumericCharacters property to ="0".

Upvotes: 1

Related Questions