Last post Jan 29, 2006 07:19 PM by ebsn
Jan 29, 2006 05:30 PM|ebsn|LINK
Jan 29, 2006 07:19 PM|ebsn|LINK
Hi, ive just sorted out this issue, sry didnt fully check on the posts posted in this forum before. Ive got some good ideas from others' posts.
Here is the solution to my problem:
1. firstly you need to register a user which you want it to be the admin account( call it "admin");
2. Then in the remote database server( Your host), you execute the following queries to approve the "admin"
SELECT UserId FROM aspnet_Users WHERE UserName = 'admin', from this you get the userId of admin, then UPDATE aspnet_Membership SET IsApproved = 1 WHERE UserId = 'userid of admin', thus the admin account has been approved.
3. If you want to have the admin power, execute the following queries:
SELECT RoleId FROM aspnet_Roles WHERE RoleName = 'Administrators' from this you get the RoleId of Administrator, then just execute this query you can assign admin power to the user "admin":
INSERT INTO aspnet_UsersInRoles (RoleId, UserId) VALUES ('<roleID of Administrators', 'userID of admin)
This is a bit awkward, but its a handy solution if you want to just try your host database to see if it works. I saw other guys could launch ASP.NET Web Site Administration Tool for the remote host, i failed to do this as it generated the follow error:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider,
error: 40 - Could not open a connection to SQL Server)
My host is running MS Sql 2000 and i have got the correct connection string, but not sure why it failed to connection the remote host, any ideas would be very helpful.
PS. sry about my bad english, hope it can explains something :P