Monday, October 6, 2008

Byepassing Password Criteria from ASP.NET Membership

If you ever seen an annoying comment like 'Password must me 7 characters long, and containg atleast 1 non-alphanumeric character. You can remove by making some slight changes in the web.config file. Below sample, removes the Q&A and E-Mail from Create-User Wizard. Also, asks for password of 4 characters long, and that too without any non-aplhanumeric character.

<authentication mode="Forms" />
   <membership defaultProvider="MyProvider">
      <providers>
      <add name="MyProvider" type="System.Web.Security.SqlMembershipProvider"
connectionStringName="LocalSqlServer" requiresUniqueEmail="false"
requiresQuestionAndAnswer="true"
minRequiredPasswordLength="4" minRequiredNonalphanumericCharacters="0" />
      </providers>
   </membership>

No comments:

 
Best viewed in Internet Explorer 8.