Frequently Asked Questions

Help Center Search

Granting Administrator Privileges to ASP.NET 2.0 Personal Web Site User Account

Print this Article
Comment on this Article
Last Updated: August 12, 2008 11:01 AM

An ASP.NET 2.0 Personal Web Site allows for the creation of site user accounts. After an account is created, administrator privileges can be granted through the Hosting Control Center. Administrator accounts are permitted to manage site content after log in.

NOTE: All user accounts must be manually activated through the Hosting Control Center after creation. For more information about activating user accounts, see Activating ASP.NET 2.0 Personal Web Site User Account.

For more information about the ASP.NET 2.0 Personal Web Site, see the Introduction to the Personal Web Site Starter Kit on MSDN.

To Grant Administrator Privileges to an ASP.NET 2.0 User Account

  1. Log in to your Account Manager.
  2. In the My Products section, select Hosting.
  3. Next to the hosting account you want to modify, click Manage Account.
  4. In the Databases section of the Hosting Control Center, click the SQL Server icon.
  5. Next to the name of your SQL Server database, click Open Manager. The SQL Server Web Admin tool displays.
  6. In the tree on the left, expand the Connection folder and select Connection.
  7. Enter the User Name and Password for your database. You created your user name and password when you set up your SQL server database.
  8. Expand the Tools folder on the left and select Query Analyzer.
  9. 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 11. Click Reset.

  10. 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 11. Click Reset.

  11. 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 9. Replace <userID> with the return value from step 10. Retain the single quotation marks around these values. Click Submit.