User Accounts is currently unavailable

Last post 01-06-2006 1:56 PM by J7Mitch. 105 replies.

Sort Posts:

  • User Accounts is currently unavailable

    05-13-2005, 12:02 AM
    • Star
      13,145 point Star
    • J7Mitch
    • Member since 10-19-2002, 9:23 AM
    • Posts 2,632
    • TrustedFriends-MVPs

    This error seems to happen fairly often on this release (3.0.13) and is related to getting the users in the aspnet_* tables out of sync with the users in the DNN Users table

    This can happen if you try to add a user but it fails because of constraints like password length. This should roll back better in the next release but if you find yourself in this situation and wan't to try and fix it then the following SQL may help.  Warning: Use this SQL at your own risk and after backing up your DB, I have ran it successfully more than once, but you never know.

    First run this to see if the tables are out of Sync:

    select * from aspnet_Users au left outer join Users u on au.UserName = U.UserName where U.UserName is null

    If that returns records then you can remove them by running this:

    DECLARE @UserName varchar (50)

    --get a cursor to hold all the orphaned users
    --that are in aspnet_Users table that are not in the DNN Users table
    DECLARE users_cursor CURSOR FOR
    SELECT au.UserName FROM aspnet_Users au
    LEFT OUTER JOIN Users u on au.UserName = U.UserName
    WHERE U.UserName is null

    OPEN users_cursor

    -- Perform the first fetch.
    FETCH NEXT FROM users_cursor INTO @UserName

    -- Check @@FETCH_STATUS to see if there are any more rows to fetch.
    WHILE @@FETCH_STATUS = 0
    BEGIN
        --delete the user from all the aspnet_* tables that it may be in
        --one at a time to avoid referrential integrity constraints

        delete aspnet_Membership where UserId =
            (select am.UserId from aspnet_Membership am inner join aspnet_Users au on am.UserId = au.UserId
            where au.Username =@UserName)
       
        delete aspnet_Profile where UserId =
            (select ap.UserId from aspnet_Profile ap inner join aspnet_Users au on ap.UserId = au.UserId
             where au.Username =@UserName)
        delete aspnet_UsersInRoles where UserId
            in (select uir.UserId from aspnet_UsersInRoles uir inner join aspnet_Users au on uir.UserId = au.UserId
            where au.Username =@UserName)
       
        delete from aspnet_Users where Username =@UserName  
       
        FETCH NEXT FROM users_cursor INTO @UserName
    END

    CLOSE users_cursor
    DEALLOCATE users_cursor
    GO

    John M.

    DotNetNuke Module for Performance
  • Re: User Accounts is currently unavailable

    05-13-2005, 12:21 AM
    • Star
      11,175 point Star
    • mrswoop
    • Member since 04-11-2003, 3:51 PM
    • Seattle, WA
    • Posts 2,235
    Thanks John... working with this issue right now... I'll have a go and let you know *grin*
    Scott Willhite
    It is only with the heart that one can see rightly... what is essential is invisible to the eye.
    ~ Antoine de Saint-Exupéry
  • Re: User Accounts is currently unavailable

    05-13-2005, 3:09 AM
    • Contributor
      2,850 point Contributor
    • Nocturnal
    • Member since 10-14-2003, 10:58 PM
    • Ridgefield, CT - USA
    • Posts 570
    Of course the Users table may have an objectQualifier in front of it so be sure to add whatever you set it to when you run the query.
    SquadEngine for game squad and clan hosting
    GravityPoint for all other group portal hosting
    TungstenTech: DNN Site
  • Yes [Yes] Re: User Accounts is currently unavailable

    05-13-2005, 11:01 AM
    • Member
      140 point Member
    • mcalder
    • Member since 05-13-2003, 9:22 AM
    • Ottawa, Canada
    • Posts 28

    Thanks John, I ran this on my portal and successfully removed 3 user records.  Worked fine.

  • Re: User Accounts is currently unavailable

    05-13-2005, 2:34 PM
    • Star
      13,145 point Star
    • J7Mitch
    • Member since 10-19-2002, 9:23 AM
    • Posts 2,632
    • TrustedFriends-MVPs
    Excellent. Thanks for letting us know. So, did you have the error on Admin > User Accounts to start with, and afterwards you could manage users again?
    John M.

    DotNetNuke Module for Performance
  • Re: User Accounts is currently unavailable

    05-13-2005, 10:05 PM
    • All-Star
      16,504 point All-Star
    • hooligannes97
    • Member since 09-26-2003, 2:57 PM
    • Bolivia
    • Posts 2,917
    • Moderator
    I used Wallew's module to import users from a customized DNN2 version. It choked at some usernames that had unusual characters. So the problem showed up and I did the cleaning manually. Basically what needs to be done is to remove the users from the aspnet prefixed tables: Profile, users, membership. I thought about creating the script but there were only a few users so I just put that into the back burner. Thanks JMitch. one less thing to do.
    Do you know the truth when you hear it?
  • Re: User Accounts is currently unavailable

    05-14-2005, 2:49 PM
    • Member
      60 point Member
    • zohra
    • Member since 10-25-2002, 8:30 AM
    • UK, France
    • Posts 12
    Does it mean that you are deleting your users registration?. If I roll back to DNN 3.12 are the problem resolved. I have clients that I have tried to register but erro shows user invalid
  • Re: User Accounts is currently unavailable

    05-14-2005, 3:28 PM
    • Star
      13,145 point Star
    • J7Mitch
    • Member since 10-19-2002, 9:23 AM
    • Posts 2,632
    • TrustedFriends-MVPs

    It will only delete users that are not fully registered with DNN. All users that are fully registered and working will be left alone.

    You can run the first select query to see what users will be deleted before running the second TSQL script.

    If you are using the Membership tables to for other applications besides DNN then you don't want to run this.

    I guess it would be easy enough to turn this around and add the members from the aspnet_ tables to the DNN tables.

    John M.

    DotNetNuke Module for Performance
  • Re: User Accounts is currently unavailable

    05-15-2005, 8:27 AM
    • Member
      20 point Member
    • davidllamas
    • Member since 05-15-2005, 12:15 PM
    • Posts 4

    When a users is removed from a portal, the name is still on the database, and a user with the same name can't be created. Although the name is in the database, nothing can be seen from the users menu of the portal.

    Any idea how this can be solved or, at least, how that users from the database can be cleaned?

    Rgrds

     

  • Re: User Accounts is currently unavailable

    05-15-2005, 10:25 AM
    • Star
      13,145 point Star
    • J7Mitch
    • Member since 10-19-2002, 9:23 AM
    • Posts 2,632
    • TrustedFriends-MVPs

    When a users is removed from a portal, the name is still on the database, and a user with the same name can't be created. Although the name is in the database, nothing can be seen from the users menu of the portal.

    Are you saying that you removed the user through the DNN interface and it didn't get totally removed?

    That would be a bug that I haven't heard of, but the above script should help you there unless it is a case of the user not getting removed from the DNN Users table, then you would just need to go in and delete the user from that table.

    John M.

    DotNetNuke Module for Performance
  • Re: User Accounts is currently unavailable

    05-15-2005, 11:17 AM
    • Star
      10,052 point Star
    • Geert
    • Member since 06-18-2002, 11:43 AM
    • The Netherlands
    • Posts 2,011

    When a users is removed from a portal, the name is still on the database, and a user with the same name can't be created. Although the name is in the database, nothing can be seen from the users menu of the portal.

    I only know of a problem like this after deleting a superuser. That has just been fixed an hour ago.

     

    Geert Veenstra
  • Re: User Accounts is currently unavailable

    05-16-2005, 11:41 AM
    • Member
      295 point Member
    • arctain
    • Member since 02-22-2005, 5:08 PM
    • The Great Northwest
    • Posts 59

    All,

    I have upgraded from DNN 3012 to 3013 and am getting this same error. While the deletion of the "not fully registered" users does resolve the  "users accounts not accessible" hard error, it does not resolve the error with registering new users. The SuperUser account has not been deleted, and rolling back to 3012 does resolve the error. At this point (after upgrading to DNN 3013) new users cannot be added without causing an error.

    J.Arctain

    -The greatest good you can do for another is not just share your riches, but reveal to them their own.
    --Benjamin Disraeli
  • Re: User Accounts is currently unavailable

    05-16-2005, 1:19 PM
    • Star
      13,145 point Star
    • J7Mitch
    • Member since 10-19-2002, 9:23 AM
    • Posts 2,632
    • TrustedFriends-MVPs
     arctain wrote:

    All,

    I have upgraded from DNN 3012 to 3013 and am getting this same error. While the deletion of the "not fully registered" users does resolve the  "users accounts not accessible" hard error, it does not resolve the error with registering new users. The SuperUser account has not been deleted, and rolling back to 3012 does resolve the error. At this point (after upgrading to DNN 3013) new users cannot be added without causing an error.

    I don't have any problem adding users to my upgraded sites.  It would be interesting to find out what is different about your environment.

    John M.

    DotNetNuke Module for Performance
  • Re: User Accounts is currently unavailable

    05-16-2005, 1:31 PM
    • Star
      10,052 point Star
    • Geert
    • Member since 06-18-2002, 11:43 AM
    • The Netherlands
    • Posts 2,011

    I also keep hearing this problem.

    Is it possible that someone who is experiencing these problems after upgrading zip up their database and DotnetNuke folder and send it me so I can compare with a standard 3.0.13 version (database) and find out what's happening here ?

    (Or you could compare it yourself of course)

    Geert Veenstra
  • Re: User Accounts is currently unavailable

    05-16-2005, 1:42 PM
    • Member
      295 point Member
    • arctain
    • Member since 02-22-2005, 5:08 PM
    • The Great Northwest
    • Posts 59

    DNN 3013 build version 3.0.13.13077

    Windows 2003 server (with all service packs applied) and also getting the same on a WinXP pro development environment

    Have not had a chance to see if the build version 3.0.13.36098 encounters the same issue.

    No changes to the Web.Config file other than the original database setup change: add key="SiteSqlServer" value="Server=(local);Database=dbXXX;uid=dbUserXXX;pwd=XXX;"  etc...

    Thanks!

    J.Arctain

    -The greatest good you can do for another is not just share your riches, but reveal to them their own.
    --Benjamin Disraeli
Page 1 of 8 (106 items) 1 2 3 4 5 Next > ... Last »