This is something that worked for me. This assumes that you have access to SQL Query Analyzer.
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.
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.
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.
I worked on shared web server with HELM as interface and SQL 2000 availabe on server.
For PWSK to work you have to create two databases on server one for album and one for security, probably you have to use another names for databases than standard because default could be use by other user. You have to create at least one user to access
each database.
next you have to run aspnet_regsql.exe when it will ask for server name you can use IP address of you SQl Server (you should get it from provider) select SQl Server autentication and use user created for security database your created before and type name
of your security database.
When you finish this step you will have security database created on your web server only for your web pages and you can use it for PWSK and for another applications.
Now you only have to setup your connection strings like this in web.config file :
Next copy page content to server and run it.It should create everything for your (roles in security database and SQL procedures for album in youralbumdatabase.
You can also use this connection information on your computer at home and in that case you can setup security for your page from inside your development environment at your local computer. Page on your local computer will use the
same SQL server which your web page use so you can work on you web page from server or from home.
Looks like I've been having similar problems to Alan. I've updated the web.config file but I am unable to create a user on the live site (which I could then make into an admin user). When I enter the first set of details for the new user and click 'Create
User' the site doesn't respond, and eventually goes to the error page.
This was working fine when I developed it locally (with SQL Express) before moving to SQL Server on the hoster's server, so I'm guessing its something to do with my configuration. One thing I have noticed is that all my DB tables are in one database on the
server, but the membership tables are prefixed with dbo. rather than my username.
eg. dbo.aspnet_Applications, dbo.aspnet_Membership as opposed to
<username>.Events for the data tables.
How should web.config look like if i publish on my local iis. Do i need to create a new user and database in sql express management tool ? The thing is that the login works in VS2005 but when in publish to my default website in iis login and account creation doesnt
work.
For those who use c#, I developed an User management module for download. You can approve and disapprove user online after you login. It's very simple, a quick and dirty work but can get the job done. I have source code for download. Please go to "step 8"
masterivc
Member
60 Points
12 Posts
Re: Problems uploading Personal Website Starter Kit to Remote Server
May 18, 2006 09:49 PM|LINK
SELECT RoleId FROM aspnet_Roles WHERE RoleName = 'Administrators'
Click Submit and save the return value for use in step 11. Click Reset.
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.
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.
jpazgier
Contributor
3725 Points
622 Posts
Re: Problems uploading Personal Website Starter Kit to Remote Server
Jun 09, 2006 12:42 AM|LINK
Hi, for me worked something like this.
I worked on shared web server with HELM as interface and SQL 2000 availabe on server.
For PWSK to work you have to create two databases on server one for album and one for security, probably you have to use another names for databases than standard because default could be use by other user. You have to create at least one user to access each database.
next you have to run aspnet_regsql.exe when it will ask for server name you can use IP address of you SQl Server (you should get it from provider) select SQl Server autentication and use user created for security database your created before and type name of your security database.
When you finish this step you will have security database created on your web server only for your web pages and you can use it for PWSK and for another applications.
Now you only have to setup your connection strings like this in web.config file :
<
connectionStrings><
add name="Personal" connectionString="Data Source=xxx.xxx.xxx.xxx;Initial Catalog=ALBUMDATABASENAMEe;Persist Security Info=True;User ID=YOURALBUMUSER;password=YOURALBUMPASSWORD"/><
remove name="LocalSqlServer"/><
add name="LocalSqlServer" connectionString="Data Source=xxx.xxx.xxx.xxx;Initial Catalog=SECURITYDATABASENAME;Persist Security Info=True;User ID=YOURSECUREUSER;password=YOURSECUREPASSWORD "/></
connectionStrings>Next copy page content to server and run it.It should create everything for your (roles in security database and SQL procedures for album in youralbumdatabase.
You can also use this connection information on your computer at home and in that case you can setup security for your page from inside your development environment at your local computer. Page on your local computer will use the same SQL server which your web page use so you can work on you web page from server or from home.
Thanks
Janusz
JPazgier
mccullgj
Member
5 Points
1 Post
Re: Problems uploading Personal Website Starter Kit to Remote Server
Jun 15, 2006 08:27 AM|LINK
Hi Sue,
Looks like I've been having similar problems to Alan. I've updated the web.config file but I am unable to create a user on the live site (which I could then make into an admin user). When I enter the first set of details for the new user and click 'Create User' the site doesn't respond, and eventually goes to the error page.
This was working fine when I developed it locally (with SQL Express) before moving to SQL Server on the hoster's server, so I'm guessing its something to do with my configuration. One thing I have noticed is that all my DB tables are in one database on the server, but the membership tables are prefixed with dbo. rather than my username.
eg. dbo.aspnet_Applications, dbo.aspnet_Membership as opposed to <username>.Events for the data tables.
Anyone got any suggestions?
Thanks,
Gary.
Kenty2006
Member
185 Points
37 Posts
Re: Problems uploading Personal Website Starter Kit to Remote Server
Jun 15, 2006 02:10 PM|LINK
Hi. Same problems for me.
How should web.config look like if i publish on my local iis. Do i need to create a new user and database in sql express management tool ? The thing is that the login works in VS2005 but when in publish to my default website in iis login and account creation doesnt work.
suegooge
Participant
1180 Points
235 Posts
Re: Problems uploading Personal Website Starter Kit to Remote Server
Jun 19, 2006 02:05 AM|LINK
For those who use c#, I developed an User management module for download. You can approve and disapprove user online after you login. It's very simple, a quick and dirty work but can get the job done. I have source code for download. Please go to "step 8"
http://www.edream.org/BlogArticle.aspx?RecordID=115