Click here for important information about

client can't connect to windows server

October 13, 2010 at 17:26:33
Specs: windows server standard
I have a visual studio c# program that is supposed to run from a local computer and connect to a windows server to sql server 2008 and deliver data back to the local machine.

The connection string is "Server=10.200.362.22;Database=EMPDATA;Trusted_Connection=True;

I get the error "login failed: this login is from an untrusted domain and cannot be used with windows authentication"

When I look in the server manager/diagnostics/event viewer/windows logs/security at the logs I can see my attempted login.

For targetUserName it has my local computer user name like Ann, and for targetDomainName it has Delllaptop which is what I called my computer when I set it up.

So, if I put user id in my connection string:
the log info doesn't change - it doesn't say

So, of course the server does not recognize my home computer information and that's why I can't connect. But how do I fix this?

Thank you for any help. I have been trying to fix this for 2 days.

See More: client cant connect to windows server

October 13, 2010 at 17:31:00
FYI: in the log for SubjectUserName and SubjectDomainName it is blank.

The OS is windows server standard without hyper-V.

Report •

October 14, 2010 at 11:18:27
Trusted_Connection=True is overriding your User Set it to False, and include a password.

Suggested reading:

How To Ask Questions The Smart Way

Report •

October 14, 2010 at 15:28:27
Thank you, I tried that today. I tried these two connection strings:

Data Source=10.200.362.22;Initial Catalog=WHLDATA;Trusted_Connection=False;User ID=username;Password=password

Data Source=10.200.362.22,1433;Initial Catalog=WHLDATA;Network Library=DBMSSOCN;Trusted_Connection=False;User ID=username;Password=password

In both cases I got:
failed to connect to server, login failed for username

I have repeatedly read the link you included in the past few days along with many others.

Are these connection strings trying to use sql server authentication?

I might need to setup a sql server user because I can't log directly on to sql server using this username and password with sql server authentication. It's what I use to log onto the server itself.

Plus, I want to distribute this solution to many customers so it would be better if each did not have to have a username/password embedded in the connection string.

But I will do it if it's the only way.


Report •

Related Solutions

March 14, 2011 at 14:37:34
Are you able to resolve this issue ?


Report •

Ask Question