locked
Can someone please refresh my memory on how to set up users as administrators? RRS feed

  • Question

  • User510817238 posted

    Can someone please refresh my memory on how to set  up users as administrators?

    I know you need to go into the database.. what I don't remember is

    which three tables are involved?

    I know I need to get the numbers from one table and enter that number into another table to set up; the

    administrator. Biut I can;t remember which tables and which steps are involved... Anyone to refresh my memory?

    thanks in adavance

    wanagi31206

     

    Thursday, September 4, 2008 10:31 AM

All replies

  • User1485238302 posted

    I have not used this kit but am just guessing, I think you can use the Web Site Configuration Tool to create users and roles.

    Thursday, September 4, 2008 10:48 AM
  • User-1705717250 posted

    1: Copy the following T-SQL statement into the Query Analyzer window:

    SELECT RoleId FROM aspnet_Roles WHERE RoleName = 'Administrators'

    Click Submit and save the return value for use in step 3. Click Reset.

    2: Copy the following T-SQL statement into the Query Analyzer window:

    SELECT UserId FROM aspnet_Users WHERE UserName = '<username>'

    Replace <username> with the user name of the account to which administrator privileges will be granted.
    Retain the single quotation marks around this case-sensitive value.
    Click Submit and save the return value for use in step 3. Click Reset.

    3: Copy the following T-SQL statement into the Query Analyser window:
     
    INSERT INTO aspnet_UsersInRoles (RoleId, UserId) VALUES ('<roleID>', '<userID>')

    Replace <roleID> with the return value from step 1.
    Replace <userID> with the return value from step 2.
    Retain the single quotation marks around these values.
    Click Submit.

    Hope it helps

    Thursday, September 4, 2008 10:58 AM
  • User730446648 posted

    There's a much easier way.

    To apply yourself as the Administrator, go to this link:

     http://forums.asp.net/t/1110595.aspx

    At the bottom of the first post is a great users.aspx zip file,

    All you then have to do is upload the two users files to the root of your web page,

    create a user ID through through your web site, just as though you are one of your users.

    Point your browser at that users.aspx page and change yourself to an administrator.

    And then VERY IMPORTANT move that users.aspx file to Admin or somewhere secure.

    Good Luck

    Daniel

    Thursday, September 4, 2008 4:53 PM