SQL Server error: Login failed for user ‘user’

While creating a new .NET application, I tried to load the login page and saw this error waiting for me in the Event Viewer:

Login failed for user ‘scott’. Reason: Failed to open the explicitly specified database ‘Test1’

This error had a code of 18456, if you are keeping score at home.

Short story even shorter, I had the wrong name in the web.config connection string that pointed to the database. As you can see in the error, the database named was “Test1”. In the connection string, I had it named “Testv1”.

 

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: