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.
For me this did the trick
Note: this may not be advisable in a production environment, but I was just testing a local non-prod app so it solved the problem for me.