Wednesday, March 28, 2012

Moving to hosted dedicated server - Cannot open database requested in login

Hello all,
I hope someone can help with my current issue as i have now spent the last 8hours trying to solve it! Here goes...
I am currently moving all my websites from our in house set up to a FASTHOSTSdedicated server. Our in house set up consists of separate server for weband data and works well even with my recent foray into .Net sites.
I have just moved the most recent of my .Net sites(http://www.alfadealerads.co.uk/home.aspx) to the FASTHOSTS server and cannotget the site to connect to the database (this has also been installed on theFASTHOSTS server). One of the pages that connects to the DB ishttp://www.alfadealerads.co.uk/links.aspx, where i am getting the error..
System.Data.SqlClient.SqlException: Cannot open database requested in login'MasseratiChauffeurDrive'. Login fails.
Login failed for user 'lateral'.
This DB has been restored from back up from the original DB. I haverecreated the user name on the new SQL server and added it to the new DBalso. I am using a webconfig to connect to the DB, the exact same onethat works on my current live server(http://www.maseratichauffeurdrive.com/home.aspx) only with the obvious changeto the SQL server name.
The only difference i can see in the 2 setups is that the new one has both thewebserver and the SQL server on the one machine and that machine uses domains.
My current in house setup does not use domains and as mentioned before web anddate are 2 separate servers.
Can anyone help? Or even understand what the hell i have written? lol
Thanks in advance



I know the backup and restore wizard can restore everything including login so the question is why do you have to recreate the login after the restore. I would do a fresh restore and delete the current database and try to login without any changes. Hope this helps.|||

TheFIsh wrote:


System.Data.SqlClient.SqlException: Cannot open database requested in login'MasseratiChauffeurDrive'. Login fails.
Login failed for user 'lateral'.
This DB has been restored from back up from the original DB. I haverecreated the user name on the new SQL server and added it to the new DBalso. I am using a webconfig to connect to the DB, the exact same onethat works on my current live server(http://www.maseratichauffeurdrive.com/home.aspx) only with the obvious changeto the SQL server name.


When you created the new login account, did you check the "SQL ServerAuthentication" radio button instead of leaving it on the default"Windows Authentication"?
|||Thanks for the feedback.
When you created the new login account, did you check the "SQL ServerAuthentication" radio button instead of leaving it on the default"Windows Authentication"?
Yes i checked the SQL server authentication and specified a password. Still not solved.
Cheers,
Stephen

No comments:

Post a Comment