码迷,mamicode.com
首页 > 数据库 > 详细

修改AspNetSqlMembershipProvider的密码规则

时间:2015-07-17 17:47:21      阅读:150      评论:0      收藏:0      [点我收藏+]

标签:

在AspNetSqlMembershipProvider中,默认的密码规则为长度大于等于7,并且包含1个除字母和数字外的特殊字符,这项规则主要由minRequiredPasswordLength和minRequiredNonalphanumericCharacters两个参数控制。minRequiredPasswordLength控制密码长度,minRequiredNonalphanumericCharacters控制非数字字符的个数。更改密码规则修改这2项参数即可,如下配置为密码长度大于等于3位,并且可以不包含特殊字符。

<membership defaultProvider="i">
      <providers>
        <add name="i" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
        <add connectionStringName="SQLConnectionString" passwordAttemptWindow="5" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" minRequiredPasswordLength="3" minRequiredNonalphanumericCharacters="0" description="Stores and Retrieves membership data from SQL Server" name="SQL-MembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      </providers>
    </membership>

 

修改AspNetSqlMembershipProvider的密码规则

标签:

原文地址:http://www.cnblogs.com/zzkun/p/4654675.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!