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”.