“创建新用户”控件要求密码长度7位,必须包含非字母数字字符1个(如@#$%^&),我现在不想要求用户设置这么强的密码,只需要4位,纯数字密码也可以我在 web.config 做如下设置: <membership>
<providers>
<add connectionStringName="SqlServices"
name="SqlProvider"
type="System.Web.Security.SqlMembershipProvider"
applicationName="mySite"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="true"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
passwordAttemptWindow="10"
minRequiredPasswordLength="4"
minRequiredNonAlphaNumericCharacters="0"
/>
</providers>
</membership>实际测试时总提示 minRequiredNonAlphaNumericCharacters="0" 属性未被识别的系统错误,MSDN 的帮助也是这样用的啊,大侠帮忙!!
<providers>
<add connectionStringName="SqlServices"
name="SqlProvider"
type="System.Web.Security.SqlMembershipProvider"
applicationName="mySite"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="true"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
passwordAttemptWindow="10"
minRequiredPasswordLength="4"
minRequiredNonAlphaNumericCharacters="0"
/>
</providers>
</membership>实际测试时总提示 minRequiredNonAlphaNumericCharacters="0" 属性未被识别的系统错误,MSDN 的帮助也是这样用的啊,大侠帮忙!!
ConfirmPasswordCompareErrorMessage="确认密码不符。" ContinueDestinationPageUrl="~/login.aspx"
DisplayCancelButton="True" DuplicateUserNameErrorMessage="您要注册的用户名已被使用。" ContinueButtonText="继续"
LoginCreatedUser="true" EmailLabelText="电子邮件:" PasswordRegularExpression="[0-9a-zA-Z~!@#$%^&-_+=|<>]{4,12}">但还是不起作用,跟没设一样