Click here to Skip to main content
15,905,028 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a project connected with Sql Server database that is working perfectly on my PC but when I want to run it on another PC the error comes up :

>Login failed. The login is from an untrusted domain and cannot be used with windows authentication.

Can you please help me?

What I have tried:

So far I have read some solutions on google but I think that none of them fits to my problem.
Posted
Updated 27-Feb-16 4:03am

1 solution

The error is pretty self explanatory: you cannot use "Integrated Security=True" with that connection, you must use a valid SQL database username and password combination that has appropriate permissions for the specific database you are trying to access.
So instead of
Data Source=localhost;Initial Catalog=MyDb;Integrated Security=True

You need something like:
Data Source=palm.MyHostingService.com;Initial Catalog=MyDb;Persist Security Info=True;User ID=MyUserName;Password=MyUserPassword
 
Share this answer
 
Comments
PeMaCN 27-Feb-16 10:40am    
What should be myUsername and myPassword? What if I cant remember them?
OriginalGriff 27-Feb-16 10:45am    
"What should be myUsername and myPassword?"
Ask your DB administrator.
These are passwords ... so I have no idea what they will be!
"What if I cant remember them?"
Write them down next time he tells you what they are! :laugh:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900