Changing all table names of ASP.NET 2.0 PW Stater kit and moving it to Godaddy.com (3)

Due to the statment before, my multiple asp.net projects work.

However, I have to record another quesition: After I transfer my local asp.net projects on the sub folder of godday account, I found there was no Adminitrator Account in my project! This because I could not upload my user data since asp.net 2.0 use divided database for users account. Then I have searched a way to resolve it:

What I should do are:

1. on my godaddy personal website and create an account named ‘admin’ and its password. (make sure the usernames and passwords are the same as on my local machine!!!)

2: Log back into godaddy Query Analyzer
3: Copy the following T-SQL statement into the Query Analyser window:

SELECT RoleId FROM aspnet_Roles WHERE RoleName = ‘Administrators’
SELECT UserId FROM aspnet_Users WHERE UserName=’username’ (here my username is admin)

Click Submit and get Role ID and User ID , save the return value for use in step

4: Copy the following T-SQL statement into the Query Analyser window:

INSERT INTO aspnet_UsersInRoles (RoleId, UserId) VALUES (‘<roleID>’, ‘<userID>’)

EXAMPLE: INSERT INTO aspnet_UsersInRoles (RoleId, UserId) VALUES (‘{7321ED9B-64FB-47C2-B139-2AF810678D59}’, ‘{E421C366-2905-40FC-8543-0AA618FEE17E}’)

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

5: Copy the following T-SQL statement into the Query Analyser window:

UPDATE aspnet_Membership SET IsApproved = 1 WHERE UserId = ‘<userID>’ (this step active admin account)

Done.

The following is other people’s walkthrough for PWS installing on godaddy.com

GoDaddy Installation Walkthrough for Personal website starter kit

from www.asp.net

1. Create your site locally. Include AT LEAST 1 local admin account.
2. Run site using CTRL-F5.
3. Log into your GoDaddy hosting account and open the control panel.
4. Click on ASP.Net runtime and select 2.0
5. Click Databases > SQL Server > Create New Database.
6. Select
1. Check DSN (optional?)
2. Enter UserName (this will become the database name NOT your hosting login)
3. Enter Password (again, database password NOT hosting password)
4. Check “Install Schema Features”
7. Click Continue > Create Database (it WILL take some time for the database to create itself, you can refresh by clicking the SQL button in the left menu)
8. Once setup finishes, Click Pencil icon under actions > print this page.
9. Click Computer icon under actions > record the SQL Connection (.NET) strings
10. Click Open Manager
11. Click Connection > Enter the Username and Password from 6 above.
12. Once connected, expand Tools menu > Click Query Analyzer
13. Cut & Paste all text from club-add.sql into the Query Analyzer window

14. Click Submit (you should see many “command(s) completed successfully” below)

15. Go back to VWD and edit default.aspx
16. Go to Edit > Find & Replace > Quick Replace
1. Find dbo. (NOT Dbo. big difference)
2. Replace with <blank> (nothing, nada, zip, zero)
3. Look in: Current Document
17. Click Replace All (should be 12 or more) > Save default.aspx
18. Repeat steps 16 & 17 for:
1. Events_Edit.aspx
2. Events_View.aspx
19. Open web.config
1. Replace original text
1.

<add name=”ClubSiteDB” connectionString=”Data Source=.\SQLExpress;

Integrated Security=true;

AttachDBFileName=|DataDirectory|Club.mdf;

User Instance=True” providerName=”System.Data.SqlClient”/>
2.

With new text
1.

<add name=”ClubSiteDB” providerName=”System.Data.SqlClient”

connectionString=”server=whsql-v04.prod.mesa1.secureserver.net;

database=DB_12345;

uid=myusername;

pwd=mypassword”/>

<remove name=”LocalSqlServer”/>

<add name=”LocalSqlServer” providerName=”System.Data.SqlClient”

connectionString=”server=whsql-v04.prod.mesa1.secureserver.net;

database=DB_12345;

uid=myusername;

pwd=mypassword”/>
20.

Change <customErrors mode=”Off” /> (optional)
21.

Save!!!
22.

Run CTRL-F5 again. (it will bring up a window with a server error, what you want is to look in the lower left corner of the VWD window for “Build Successful”)
23.

Click Website > Copy Web Site > Connect
24.

Input your hosting username and password (NOT you database uid and pwd)
25.

Highlight all files from the left side and click right arrow to transfer.
26.

* Go to your public website and create an account for each admin you created on your local database. (make sure the usernames and passwords are the same!!!)
27.

Log back into Query Analyzer
28. To Grant Administrator Privileges to an ASP.NET 2.0 User Account

1. Log in to your Account Manager.
2. Under the Hosting & Email section, select Hosting Account List.
3. Next to the hosting account you want to modify, click Open.
4. Under the Databases section of the Hosting Manager, 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 Analyser.
9. Copy the following T-SQL statement into the Query Analyser 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 Analyser 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>’)
EXAMPLE: INSERT INTO aspnet_UsersInRoles (RoleId, UserId) VALUES (‘7321ED9B-64FB-47C2-B139-2AF810678D59’, ‘E421C366-2905-40FC-8543-0AA618FEE17E’)

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.

Thanks again to BoosterMan, and all those who made this walkthrough possible. Great Job and keep up the good work