修改AspNetSqlMembershipProvider的密码规则
在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>