SQL Server Persistence Upgrade - SqlClient version 4

Component: Sql Persistence

Version 4 of Microsoft.Data.SqlClient includes a breaking change which sets Encrypt=True by default. If the client and server are not configured with a valid certificate, this can cause an exception at startup:

  Message=A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)
  Source=.Net SqlClient Data Provider

To fix this, the SQL Server installation must be updated with a valid certificate and the machine hosting the endpoint must be updated to trust this certificate.

It is not recommended to eliminate this warning by adding Encrypt=False or TrustServerCertificate=True to the connection string. Both of these options leave the endpoint unsecure.

Related Articles

Last modified