Monday, November 15, 2010

Troubleshooting a failed login with correct user name and password

After setting up a new Database in SQL Server 2008 R2 and configuring DotNetNuke (DNN), an ASP.NET application, to connect to the new database I got received this message:
Connection Error(s):
Index #: 0
Source: .Net SqlClient Data Provider
Class: 14
Number: 18456
Message: Sql login failed

I open up SQL Server Management Studio and reset the user password.  Try again from DNN, same error.

I try connecting via SQL Server Management Studio.  Login failed.

I look in event Viewer and see
Login failed for user 'dotnetnuke'. Reason: An attempt to login using SQL authentication failed. Server is configured for Windows authentication only. [CLIENT: <local machine>]

I open up up SQL Server Management Studio and connect to '.'

I right click the SQL Server 10.50.1600 node and

  1. Select properties
  2. Select Security Page
  3. Under Server authentication change it to 'SQL Server and Windows Authentication mode'

Right click the SQL Server 10.50.1600 node again and select 'Restart' from the sub menu.

Back to the application and login is successful.


Anonymous said...

Or, switch the application pool identity to a domain account and create a new server login. Hurray integrated security!

Anonymous said...

This is such a great resource that you are providing and you give it away for free. I enjoy seeing websites that understand the value of providing a prime resource for free. I truly loved reading your post. Thanks!

Anonymous said...

Couldnt agree more with that, very attractive article

Anonymous said...

Wow this is a great resource.. I’m enjoying it.. good article