none
Remote SQL server connection string problem RRS feed

  • Question

  • hi there,

    Actually m workin on a c#.Net 2003 application.

    Whenever i connect to SQL Server (Express) on my local computer (through ip address, port no.) using windows authentication the connection works fine....

    But when i try to do the same with a remote computer....it gives me the following error

    Login failed for user ".The user is not associated with a trusted SQL server Connection.


    note that i m using SQL Server Express & Windows Authentication in both the cases...

    Below is my connection string....

    "Network Library=DBMSSOCN;Integrated Security=SSPI;Initial Catalog=RemoteDB;Data Source="+ Ip.ToString() +",1433;Workstation ID="+ HostName.ToString() +";";


    Any help is favourable......

    thanx...
    Thursday, July 5, 2007 5:24 AM

All replies

  • Are the machines on the same domain?
    Thursday, July 5, 2007 7:24 AM
  • ya.....the machines r on the same domain...
    Thursday, July 5, 2007 9:24 AM
  • Go into sql management studio on the local pc, right click on the database, select properties, select securty, and change the authentication to MIXED MODE.  Try to reconnect.  That should do it.... If not, check your firewall settings.
    Tuesday, July 24, 2007 3:12 AM
  • If your security settings are set as Mixed
    try the following connection string.

    "server="+ Ip.ToString() +";uid=<YourSQLServerUSername>;pwd=<YourSQLServerPassword>;database=RemoteDB"


    Tuesday, July 24, 2007 9:02 AM
  • Hi all,

    I have the same problem but in my case, the machines are on different domain.

    I am looking for the connection String in this particular case.

    Any help please?

    Rhyck.

    Thursday, February 16, 2012 5:58 PM