日期:2014-05-19  浏览次数:20639 次

●●●ASP2.0中怎样除去对密码的复杂性要求
我做的网站在注册用户里要求密码复杂性非常高,要求有字母,有数字,还要有符号。

怎样才能更改一下设置,例如用户注册时密码设成 "123 "就可以了。

------解决方案--------------------
分太少了...修改 Web.config 中 membership 配置节即可,例:

<membership defaultProvider= "AspNetSqlMembershipProvider " userIsOnlineTimeWindow= "20>
<providers>
<add type= "System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a "
connectionStringName= "LocalSqlServer "
enablePasswordRetrieval= "false "
enablePasswordReset= "true "
requiresQuestionAndAnswer= "false " //不需要密码提示问题
applicationName= "/ "
requiresUniqueEmail= "false " //不需要邮件地址唯一
passwordFormat= "Hashed "
maxInvalidPasswordAttempts= "5 "
minRequiredPasswordLength= "3 " //最小密码长度,默认是7
minRequiredNonalphanumericCharacters= "1 "
passwordAttemptWindow= "10 "
passwordStrengthRegularExpression= "@\ "(?=.{3,}) " //密码复杂度匹配正则表达式
/>
</providers>
</membership>