Logins using windows authentication works but we can't get any SQL server logins to work.
This is for SQL Server 2012 running on Windows Server 2012 RS.
When we try to login we get the following error.
Login failed for user 'test_user'. (.Net SqlClient Data Provider)
Server Name: theservername
Error Number: 18456
Severity: 14
State: 1
Line Number: 65536
I looked at the SQL server logs and found the following had been logged.
Login failed for user 'test_user'. Reason: An attempt to login using SQL authentication failed. Server is configured for Windows authentication only. [CLIENT: ]
This doesn't make sense since it's not configured for Windows authentication only. To confirm this I right clicked the server (in SQL Server Management Studio) selected properties. Then selected the security tab. Then under 'Server Authentication' the option 'SQL Server and Windows Authentication mode' is selected.
I've also confirmed that only one SQL Server instance is in the server.
Your .NET code could be connecting to a different server. Your .net code could be running in a different (untrusted) domain. actually lots of possibilities
I'm actually using SQL Server Management Studio on the server to test the login. So I don't see how it could be a trust issue. In addition to using the server name in the server name field, I tried localhost and I tried the ip address of the server. In all cases I got the same login failure message.
Right click on the server name, Properties -> Security tab and click the "SQL Server and Windows Authentication Mode" and click ok. Then, you have to restart SQL Server for the change to take effect.
I was taking this over for a coworker who had been working on this for sometime now. The person must have changed this setting and not restarted the service. It seems to be working fine now.