Friday, March 9, 2012

Good old Login failed for user

I had to re-install Sql Server and now I can't log on. I get...

Login failed for user 'JobsWeekly_Login'.

I can't see anything wrong with the connection string. It used to work.Might re-installing Sql Server have got its knickers in a twist?

Cheers, WT.

When you re-installed SQL Server, did you re-add that user with the same password and give it the correct permissions on the database that you're trying to access.|||

As far as I know I've done it all.

I deleted the user, added a new login, assigned the db to the login and added all the permissions. Then using this logon I was then able to log onto the database with Management Studio and browse the tables.

|||So, does that mean it's working now?|||No, the web app I'm working on can't log on to the db.|||To rule out the obvious, is everything in your connection string perfect (server address, username, password, database. etc.)?|||

I haven't touched it since it was working...

"data source=TEST;User ID=JobsWeekly_Login;Password=password;"

The default database is set on the login. The db and ISS are both on my local machine by the way.

|||Ahh, its working. I changed the password to 'pass'. I think having the password as 'password;' confused the connection string parser. Perhaps it interpreted the ';' as a delimiter instead of part of the password. Still, it worked before! Thanks for your help.

No comments:

Post a Comment