Connect to SQL Server container from C# application

137 Views Asked by At

Have a C# App and SQL Server database from a domain environment; restored the DB in a non-domain support environment (SQL Server running in a Docker Container). Connections are successful via ODBC using SQL Server authentication:

Server         10.0.0.1
LoginID        <username of dbOwner>
Password       <password>
Default db     ThisProject

The C# App, however, always returns "Login failed: The login is from an untrusted domain" with every variation of a normal connect string:

data source=10.0.0.1;
initial catalog=ThisProject;
integrated security=False; 
User Id=<dbOsner>;
Password=<password>;
Trusted_Connection=False;

How does one configure the connect string so that the C# App connects with SQL Server authentication?

TIA!

Tested with variations:

integrated security=False, True, SSPI, <missing>;
trusted_Connection=False, True;
0

There are 0 best solutions below