Hello guys.

I'm building an application that connects to a SQL Server 2008 database via connection string. The thing is, since the computer loading the app (or the user, in either case) is outside the Active Directory domain, I can't use Windows Authentication to connect to the DB. But when I include the database credentials, it won't let me connect either, telling me that since the computer logging in is from an untrusted domain, access is denied.

The connection string goes like this:

connectionString = "Data Source=" + ServerName + ";Initial Catalog=" + DatabaseName + _
                   ";Integrated Security=SSPI;User ID=" + UserID + ";Password=" + Pwd

Any ideas?

Hello guys.

I'm building an application that connects to a SQL Server 2008 database via connection string. The thing is, since the computer loading the app (or the user, in either case) is outside the Active Directory domain, I can't use Windows Authentication to connect to the DB. But when I include the database credentials, it won't let me connect either, telling me that since the computer logging in is from an untrusted domain, access is denied.

The connection string goes like this:

connectionString = "Data Source=" + ServerName + ";Initial Catalog=" + DatabaseName + _
                   ";Integrated Security=SSPI;User ID=" + UserID + ";Password=" + Pwd

Any ideas?

Let me know for your error description..

The error number is 18452, and the message, though it is in spanish, says something like Login failed. The login is being made from an untrusted domain and cannot be done with Windows authentication The thing is, I'm not using Windows authentication to connect. I've already changed SQL's connection settings and configured it to use Mixed login

Problem solved. Stupid me. Checked the connection string property and i didn't put the ';' between password and Trusted_Connection ... so the connectionString was like this: ...;User ID=User;Password=PasswordTrusted_Connection=True *facepalm*

Edited 6 Years Ago by Nichito: n/a

This question has already been answered. Start a new discussion instead.