vscode-remote-try-sqlserver icon indicating copy to clipboard operation
vscode-remote-try-sqlserver copied to clipboard

mention they need to add this string to the connection string to connect locally with .NET "TrustServerCertificate=true"

Open roryp opened this issue 3 years ago • 1 comments

I try to connect to the sql server with C# but I needed to add "TrustServerCertificate=true" to the connection string. I recommend configuring the container with the certificate used by the sql container

roryp avatar Oct 26 '22 15:10 roryp

As discussed with Rory, the best action would be to trust the SQL certificate within the devcontainer. There is no mention of a way to pass a TLS Certificate into the container in the documentation.

However it seems you can configure the TLS cert in SQL Server for Linux https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-configure-mssql-conf?view=sql-server-2017#tls

It might be possible with a custom container https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-docker-container-configure?view=sql-server-2017&pivots=cs1-bash

Additional doc: https://stackoverflow.com/questions/67438924/sql-server-2017-on-linux-kubernetes-set-up-tls-security

cmaneu avatar Oct 27 '22 20:10 cmaneu