I am using a .NET console app to test SQL Server 2019 database connection and get following error 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.)
The user id and password are valid. The C# code is not using any encryption. I have not configured any certificate in SQL Server configuration.
- Is certificate required in SQL Server 2019?
- Can I get a self generated cert from the SQL Server?
- If no self-generated cert available, where can I get a valid certificate for free?
1条答案
按热度按时间x8diyxa71#
To improve the answer, let me sum up the comments:
While setting
TrustServerCertificate=True
orEncrypt=false
in the connection string is a quick fix, the recommended way of solving this issue is to provide a proper certificate for your SQL Server from a trusted CA.To install a certificate for a single SQL Server instance ( source ):