ASP.NET 成员资格密码长度和其他属性

发布于 2024-08-20 15:20:04 字数 744 浏览 6 评论 0原文

我要疯了,当我进入网站管理工具创建一些新用户时,它总是告诉我我的密码不是 7 个字符长。

错误消息:

Password length minimum: 7. Non-alphanumeric characters required: 1.

这是我的 web.config,似乎根本没有看过。

 <membership userIsOnlineTimeWindow="20">
       <providers>
         <remove name="AspNetSqlProvider" />
          <add name="AspNetSqlProvider" connectionStringName="LocalSqlServer"
               type="System.Web.Security.SqlMembershipProvider"

              applicationName="OCIS"
               minRequiredPasswordLength="3"/>
       </providers>
    </membership>

我什至修改了 machine.config,重新启动后,结果仍然相同。 非常令人沮丧。

你们知道为什么我的 web.config 文件似乎被忽略了吗?

谢谢你,

史蒂夫

I am going crazy, when I go into the Web Site Administration Tool to create some new users, it always tells me that my password is not 7 characters long.

Error msg:

Password length minimum: 7. Non-alphanumeric characters required: 1.

Here is my web.config, seems like it is not even looked at.

 <membership userIsOnlineTimeWindow="20">
       <providers>
         <remove name="AspNetSqlProvider" />
          <add name="AspNetSqlProvider" connectionStringName="LocalSqlServer"
               type="System.Web.Security.SqlMembershipProvider"

              applicationName="OCIS"
               minRequiredPasswordLength="3"/>
       </providers>
    </membership>

I even went as far to modify the machine.config and after rebooting, still the same result.
Very frustrating.

You guys have any ideas why my web.config files seems to be ignored?

Thank you,

Steve

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

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

发布评论

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

评论(2

贩梦商人 2024-08-27 15:20:04

AspNetSqlProvider 不是 MembershipSection 中定义的默认提供程序名称。因此,您必须按如下方式设置默认提供程序名称。

<membership defaultProvider="AspNetSqlProvider">
  <providers>
    <add name="AspNetSqlProvider" ... />
  </providers>
</membership>

The AspNetSqlProvider is not the default provider name that is defined in the MembershipSection. Thus, you have to set the default provider name as follows.

<membership defaultProvider="AspNetSqlProvider">
  <providers>
    <add name="AspNetSqlProvider" ... />
  </providers>
</membership>
愁杀 2024-08-27 15:20:04

您可能永远不需要修改 machine.config,但我理解您的沮丧。

首先,尝试根据您的规范实现本地配置中提供程序的所有属性,看看会发生什么。

<membership>
  <providers>
    <add
      name="AspNetSqlMembershipProvider"
      type="System.Web.Security.SqlMembershipProvider, ..."
      connectionStringName="LocalSqlServer"
      enablePasswordRetrieval="false"
      enablePasswordReset="true"
      requiresQuestionAndAnswer="true"
      applicationName="/"
      requiresUniqueEmail="false"
      passwordFormat="Hashed"
      maxInvalidPasswordAttempts="5"
      minRequiredPasswordLength="7"
      minRequiredNonalphanumericCharacters="1"
      passwordAttemptWindow="10"
      passwordStrengthRegularExpression=""
    />
  </providers>
</membership>

You probably should never have need to modify machine.config but I understand your frustration.

First, try implementing all properties of the provider in your local config to your specs and see what happens..

<membership>
  <providers>
    <add
      name="AspNetSqlMembershipProvider"
      type="System.Web.Security.SqlMembershipProvider, ..."
      connectionStringName="LocalSqlServer"
      enablePasswordRetrieval="false"
      enablePasswordReset="true"
      requiresQuestionAndAnswer="true"
      applicationName="/"
      requiresUniqueEmail="false"
      passwordFormat="Hashed"
      maxInvalidPasswordAttempts="5"
      minRequiredPasswordLength="7"
      minRequiredNonalphanumericCharacters="1"
      passwordAttemptWindow="10"
      passwordStrengthRegularExpression=""
    />
  </providers>
</membership>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文