views:

50

answers:

2

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

A: 

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>
Sky Sanders
+2  A: 

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>
Mehdi Golchin
That's what it was, THANK YOU so much!! I should have seen that in some of those sample, I guess I always overlooked it.Hey, thanks again.Steve
Steve