Unanswered: Error at: The user is not associated with a trusted SQL Server connection
Hi I've got a common error using SQL server 2005
"The user is not associated with a trusted SQL Server connection"
I'm building a application using C# when using a standalone environment, it worked well. But, now I have the following environment.
B. Remote machine
I changed SQL server to support SQL and WIN authentication mode and I have changed SQl server surface area configuration to support TCP/IP and Named Pipes for remote connections. But I still have two problems:
1. When using the IP - serverName of the dataserver, the error is
System.Data.SqlClient.SqlException: Login failed for user ''. The user is not associated with a trusted SQL Server connection..
1. When using the server name(MYServerName), I have this error: System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Besides, I have tried from my remote machine to use a sqlcmd -E -S tcp:myhost command but I have the same answer.
I believe you set Mixed Authentication in your SQL server in the domain XXX.
And you have an NT login in the application YYY domain.
You could try two things:
Check if you have the same NT login in XXX domain.
The XXX domain needs to trust the YYY domain to allow this to occur. You
could use SQL Server authentication instead if you don't want this trust to
occur. Trouble is you need to pass the password for the SQL login, but worth to try.