0

On windows the web app service would run under a service account and that service account would have permissions to connect to the SQL server and DB. Using a connection string similar to this:

Server=SqlServerName;Database=WebAppSample1;Trusted_Connection=True;MultipleActiveResultSets=true;Encrypt=True;TrustServerCertificate=True;Connection Timeout=30;

My company wants the web app to run on Linux, is there a special way to configure the web app or the connection string so that the web app continues to use the AD account to connect to SQL server or the only option is to specify a user name and password:

Server=SqlServerName;Initial Catalog=WebAppSample1;Persist Security Info=False;User ID=***;Password=***;MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=True;Connection Timeout=30;
Robert
  • 1
  • 1
    The connection string you use depends upon the driver you are using to connect. But if you want to use windows credentials the linux host will have to first be joined to the domain. What your company wants to do can be done, but it's a pretty involved process. It's certainly easier to just use SQL credentials (username and password in the connection string), but easier doesn't necessarily mean better! – allmhuran Jul 04 '20 at 15:47

1 Answers1

1

On Linux SqlClient currently supports only Kerberos for Windows authentication. See eg here, for setup instructions.

David Browne - Microsoft
  • 80,331
  • 6
  • 39
  • 67