Most likely, the trusted root storage of SQL virtual machines does not have a CA certificate installed.
If the connection string has Encrypt=True , either disable it (not recommended) or add the following to the connection string:
TrustServerCertificate=True
SQL Server will create a self-signed certificate if you do not install it for use, but the caller will not trust it, because it is not signed by CA, unless you tell the connection string to trust any server certificate by default.
In the long run, I would recommend using Let Encrypt to get a signed CA certificate from a well-known trusted CA and install it on a VM for free. Remember to configure it to automatically update. You can read more about this topic in SQL Server books on the Internet on the topics “Encryption Hierarchy” and “Using Encryption Without Verification”.
Thiago Silva Jul 15 '13 at 16:11 2013-07-15 16:11
source share