Membership and Role Providers - users got duplicated

Discussion in 'ASP .Net' started by awrigley@yahoo.com, Feb 20, 2007.

  1. Guest

    Hi

    An app that was chuntering away quite happily to itself had roles
    added to it. Just two: Admins and Subscribers.

    However, I seem to have mucked up when assigning the role provider in
    the Web.config file, as I just left the default, whereas in members,
    this was modified to use our online database (details below).

    The pernicious effect was two fold:

    1. The system stopped recognizing passwords and logins.
    2. It seems that all the users got duplicated.

    As we are only at the testing stage, this is no bother, just delete
    'em all. But I am a bit jittery about going live.

    Does anyone know / suspect what happened?

    I now have the following entries in the web config file:

    <membership defaultProvider="WSMembershipProvider">
    <providers>
    <remove name="AspNetSqlMembershipProvider"/>
    <add
    connectionStringName="LocalSqlServer"
    enablePasswordRetrieval="false"
    enablePasswordReset="true"
    requiresQuestionAndAnswer="true"
    applicationName="/dawnay"
    requiresUniqueEmail="true"
    passwordFormat="Hashed"
    maxInvalidPasswordAttempts="5"
    minRequiredPasswordLength="7"
    minRequiredNonalphanumericCharacters="0"
    passwordAttemptWindow="10"
    passwordStrengthRegularExpression=""
    name="WSMembershipProvider"
    type="System.Web.Security.SqlMembershipProvider, System.Web,
    Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    </providers>
    </membership>
    <roleManager
    enabled="true"
    defaultProvider="WSRoleProvider">
    <providers>
    <remove name="AspNetSqlRoleProvider"/>
    <remove name="AspNetWindowsTokenRoleProvider"/>
    <add
    connectionStringName="LocalSqlServer"
    applicationName="/dawnay"
    name="WSRoleProvider"
    type="System.Web.Security.SqlRoleProvider, System.Web,
    Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </providers>
    </roleManager>
     
    , Feb 20, 2007
    #1
    1. Advertising

  2. This should not happen if your custom Provider code and the corresponding SQL
    statements or stored procedures are written correctly. Go back and test all
    your code until you find the boo-boo. I don't think it's realistic to expect
    readers here to go around in circles trying to fix your problem for you,
    although that's just my 2 cents.
    Peter

    --
    Site: http://www.eggheadcafe.com
    UnBlog: http://petesbloggerama.blogspot.com
    Short urls & more: http://ittyurl.net




    "" wrote:

    > Hi
    >
    > An app that was chuntering away quite happily to itself had roles
    > added to it. Just two: Admins and Subscribers.
    >
    > However, I seem to have mucked up when assigning the role provider in
    > the Web.config file, as I just left the default, whereas in members,
    > this was modified to use our online database (details below).
    >
    > The pernicious effect was two fold:
    >
    > 1. The system stopped recognizing passwords and logins.
    > 2. It seems that all the users got duplicated.
    >
    > As we are only at the testing stage, this is no bother, just delete
    > 'em all. But I am a bit jittery about going live.
    >
    > Does anyone know / suspect what happened?
    >
    > I now have the following entries in the web config file:
    >
    > <membership defaultProvider="WSMembershipProvider">
    > <providers>
    > <remove name="AspNetSqlMembershipProvider"/>
    > <add
    > connectionStringName="LocalSqlServer"
    > enablePasswordRetrieval="false"
    > enablePasswordReset="true"
    > requiresQuestionAndAnswer="true"
    > applicationName="/dawnay"
    > requiresUniqueEmail="true"
    > passwordFormat="Hashed"
    > maxInvalidPasswordAttempts="5"
    > minRequiredPasswordLength="7"
    > minRequiredNonalphanumericCharacters="0"
    > passwordAttemptWindow="10"
    > passwordStrengthRegularExpression=""
    > name="WSMembershipProvider"
    > type="System.Web.Security.SqlMembershipProvider, System.Web,
    > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    > </providers>
    > </membership>
    > <roleManager
    > enabled="true"
    > defaultProvider="WSRoleProvider">
    > <providers>
    > <remove name="AspNetSqlRoleProvider"/>
    > <remove name="AspNetWindowsTokenRoleProvider"/>
    > <add
    > connectionStringName="LocalSqlServer"
    > applicationName="/dawnay"
    > name="WSRoleProvider"
    > type="System.Web.Security.SqlRoleProvider, System.Web,
    > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    > </providers>
    > </roleManager>
    >
    >
     
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Feb 20, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    389
  2. =?Utf-8?B?Ym9iYnk=?=

    Membership and Role Providers

    =?Utf-8?B?Ym9iYnk=?=, Sep 23, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    298
    =?Utf-8?B?TWFuaXNo?=
    Sep 24, 2007
  3. Roger Martin
    Replies:
    0
    Views:
    305
    Roger Martin
    May 28, 2008
  4. David C
    Replies:
    1
    Views:
    305
    Dominick Baier [DevelopMentor]
    Apr 4, 2006
  5. Replies:
    0
    Views:
    151
Loading...

Share This Page