createuserwizard 由于密码原因拒绝添加用户

发布于 2024-08-05 00:32:23 字数 2703 浏览 4 评论 0原文

在使用 createuserwizard 控件时,我发现 当我尝试添加 用户。默认情况下,passwordregularexpression属性为空,我也是 尝试将其更改为某种简单的形式,例如 .{7,},但没有任何效果...... 我知道默认情况下密码必须至少有 7 个字符,其中之一必须是字母数字等...但如何放松密码强度? 我尝试过
minRequiredPasswordLength =“1” minRequiredNonalphanumericCharacters =“0” 还尝试更改passwordStrengthRegularExpression和PasswordRegularExpression

 <asp:CreateUserWizard ID="CreateUserWizard" runat="server" 
        OnCreatedUser="CreateUserWizard_CreatedUser" 
        oncontinuebuttonclick="ContinueButton_Click" 
        EmailRegularExpression="^([\w-\.]+)@domain.com" 
        EmailRegularExpressionErrorMessage="Adresa de email trebuie sa fie [email protected]." 
        oncreatinguser="CreateUserWizard_CreatingUser" 
        ConfirmPasswordLabelText="Confirmarea parolei:" PasswordLabelText="Parola:" 
        UserNameLabelText="Nume utilizator:" 
        ConfirmPasswordCompareErrorMessage="Parola si confirmarea parolei trebuie sa coincida." 
        DuplicateEmailErrorMessage="Adresa de email introdusa este deja folosita. Va rugam introduceti alta adresa de email." 
        InvalidEmailErrorMessage="Va rugam introduceti o adresa de email valida." 
        InvalidPasswordErrorMessage="Parola trebuie sa contina minim 7 caractere." 
        PasswordRegularExpression=".{7,}" 
        PasswordRegularExpressionErrorMessage="Parola trebuie sa contina minim 7 caractere." 
        PasswordRequiredErrorMessage="Parola este obligatorie." 
        UserNameRequiredErrorMessage="Introducerea unui nume utilizator este obligatorie."
        maxInvalidPasswordAttempts="10"
        minRequiredPasswordLength="1"
        minRequiredNonalphanumericCharacters="0"
        passwordAttemptWindow="10"
        passwordStrengthRegularExpression=".{7,}"
        LoginCreatedUser="false" DisableCreatedUser="true"          
        MailDefinition-BodyFileName="/signupmail.txt" OnSendingMail="CreateUserWizard1_OnSendingMail" MailDefinition-Subject="Activate cont rotaract.ro" MailDefinition-IsBodyHtml="True">
        <WizardSteps>
            <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
            </asp:CreateUserWizardStep>
            <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
            </asp:CompleteWizardStep>
        </WizardSteps>
         <StartNavigationTemplate>
            <asp:Button ID="StartNextButton" runat="server" CommandName="MoveNext" Text="Next" />
        </StartNavigationTemplate>
    </asp:CreateUserWizard>

我做错了什么?

When working with the the createuserwizard control, I found
it always showed a "select a different password" message (in the example InvalidPasswordErrorMessage="Parola trebuie sa contina minim 7 caractere." ) when I try to add a
user. The passwordregularexpression property is empty by default, I also
tried to change it to some simple form like .{7,}, but nothing works...
I know that by default the password must have at least 7 characters and one of them must be alphanumeric etc... but how do I loosen up the password strength?
I have tried with
minRequiredPasswordLength="1"
minRequiredNonalphanumericCharacters="0"
and also tryed changing passwordStrengthRegularExpression and PasswordRegularExpression

 <asp:CreateUserWizard ID="CreateUserWizard" runat="server" 
        OnCreatedUser="CreateUserWizard_CreatedUser" 
        oncontinuebuttonclick="ContinueButton_Click" 
        EmailRegularExpression="^([\w-\.]+)@domain.com" 
        EmailRegularExpressionErrorMessage="Adresa de email trebuie sa fie [email protected]." 
        oncreatinguser="CreateUserWizard_CreatingUser" 
        ConfirmPasswordLabelText="Confirmarea parolei:" PasswordLabelText="Parola:" 
        UserNameLabelText="Nume utilizator:" 
        ConfirmPasswordCompareErrorMessage="Parola si confirmarea parolei trebuie sa coincida." 
        DuplicateEmailErrorMessage="Adresa de email introdusa este deja folosita. Va rugam introduceti alta adresa de email." 
        InvalidEmailErrorMessage="Va rugam introduceti o adresa de email valida." 
        InvalidPasswordErrorMessage="Parola trebuie sa contina minim 7 caractere." 
        PasswordRegularExpression=".{7,}" 
        PasswordRegularExpressionErrorMessage="Parola trebuie sa contina minim 7 caractere." 
        PasswordRequiredErrorMessage="Parola este obligatorie." 
        UserNameRequiredErrorMessage="Introducerea unui nume utilizator este obligatorie."
        maxInvalidPasswordAttempts="10"
        minRequiredPasswordLength="1"
        minRequiredNonalphanumericCharacters="0"
        passwordAttemptWindow="10"
        passwordStrengthRegularExpression=".{7,}"
        LoginCreatedUser="false" DisableCreatedUser="true"          
        MailDefinition-BodyFileName="/signupmail.txt" OnSendingMail="CreateUserWizard1_OnSendingMail" MailDefinition-Subject="Activate cont rotaract.ro" MailDefinition-IsBodyHtml="True">
        <WizardSteps>
            <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
            </asp:CreateUserWizardStep>
            <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
            </asp:CompleteWizardStep>
        </WizardSteps>
         <StartNavigationTemplate>
            <asp:Button ID="StartNextButton" runat="server" CommandName="MoveNext" Text="Next" />
        </StartNavigationTemplate>
    </asp:CreateUserWizard>

what am I doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

温暖的光 2024-08-12 00:32:23

部分的 web.config 中查找/添加这样的部分:

    <membership defaultProvider="FrontEndMembers">
        <providers>
            <clear/>
            <add name="FrontEndMembers" type="System.Web.Security.SqlMembershipProvider" connectionStringName="MyDatabaseName" applicationName="/Website" requiresUniqueEmail="true" passwordFormat="Encrypted" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0" enablePasswordReset="true" enablePasswordRetrieval="false" requiresQuestionAndAnswer="false"/>
        </providers>
    </membership>

强调 minRequiredPasswordLength 属性

Look for / add a section like this in your web.config within the <system.web> section:

    <membership defaultProvider="FrontEndMembers">
        <providers>
            <clear/>
            <add name="FrontEndMembers" type="System.Web.Security.SqlMembershipProvider" connectionStringName="MyDatabaseName" applicationName="/Website" requiresUniqueEmail="true" passwordFormat="Encrypted" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0" enablePasswordReset="true" enablePasswordRetrieval="false" requiresQuestionAndAnswer="false"/>
        </providers>
    </membership>

Emphasis on the minRequiredPasswordLength attribute

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文