How to create another admin once site is online

Last post 10-19-2009 9:27 PM by mikeramsey. 1 replies.

Sort Posts:

  • How to create another admin once site is online

    10-19-2009, 8:13 PM
    • Member
      15 point Member
    • redwoodbev
    • Member since 09-24-2008, 5:37 PM
    • Posts 89

     Hi,  My clubsite is online and working and I have the need to assign admin privledges to another member.  Is there a way to do this?  I tried accessing the site through VS express 2008 and the website menu doesn't have the asp.net configuration option mentioned in the "welcome.htm".  I tried going right into the data base on my server, but the darn thing is in code and I can't tell how to change a user from member to admin.  I'd appreciate any suggetions if someone has done this already.  Thanks.

    Filed under: ,
  • Re: How to create another admin once site is online

    10-19-2009, 9:27 PM
    • Member
      228 point Member
    • mikeramsey
    • Member since 10-06-2009, 7:20 PM
    • PA
    • Posts 36


    if you already have the member created that you want as an admin, just run the stored procedure 

    dbo.aspnet_UsersInRoles_AddUsersToRoles. 

    DECLARE	@return_value int
    
    EXEC	@return_value = [dbo].[aspnet_UsersInRoles_AddUsersToRoles]
    		@ApplicationName = N'YOURAPPLICATIONNAME',
    		@UserNames = N'USERNAME',
    		@RoleNames = N'ROLENAME',
    		@CurrentTimeUtc = N'CURRENTDATE'
    
    SELECT	'Return Value' = @return_value


    hope that helps

    Best Regards,
    Mike
Page 1 of 1 (2 items)