i'm facing issue
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.)
i'm facing issue
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.)
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Anandu G NathPosted Dec 20, 2023, 5:22 AM
Try to modify your Existing Connection string
"Server=IT\SQLEXPRESS; Database=TESTDB; User Id=sa; Password=sa@123; TrustServerCertificate=True"
Rijwan AnsariPosted Mar 2, 2023, 12:23 PM
I faced the same issue in my previous solution.
https://rijsat.com/2022/12/12/entity-framework-update-database-error-the-certificate-chain-was-issued-by-an-authority-that-is-not-trusted/
The default value of the Encrypt connection setting has been changed from false to true. With the growing use of cloud databases and the need to ensure those connections are secure, it’s time for this backwards-compatibility-breaking change.
We need to add additional parameters trusted_connection=true;encrypt=false; in the connection string.
Rajeev KumarPosted Mar 2, 2023, 11:49 AM
Hi Tahir plz updated your Connection String as below-
"ConnectionStrings": { "SqlServerConnection": "Server=.; Database=MyDb; User ID=MyUser; Password=MyPwd; Trust Server Certificate=true;" }
Anupam MaitiPosted Feb 2, 2023, 6:06 AM
This is happening due to the SSL certificate presented by the server is not trusted by the client. Modify your db connection string as
"Server=YourServerAddress; Database=YourDBName; User Id=YourDBUserID; Password=YourDBPassword; TrustServerCertificate=True"
Jignesh KumarPosted Feb 2, 2023, 4:32 AM
Hello Tahir,
Just add TrustServerCertificate=Yes; end of your connection string in appSettings.json file
Naimish MakwanaPosted Feb 2, 2023, 4:22 AM
Hello Tahir,
This error message is indicating that the SSL certificate used by the server you're trying to connect to is not trusted by the client you're using to connect.
Use below connection string and check.
Thanks
Naimish
Sachin SinghPosted Feb 1, 2023, 5:02 PM
Modify your connection string as
Rajeesh MenothPosted Feb 1, 2023, 4:43 PM
Hi,
In Asp.Net Core connection string you can add "Trust Server Certificate=true;".
Please check the following reference :
https://stackoverflow.com/questions/17615260/the-certificate-chain-was-issued-by-an-authority-that-is-not-trusted-when-conn/17658821#17658821
Muhammad Imran AnsariPosted Feb 1, 2023, 3:54 PM
Hi Tahir,
This error occurs when the server's SSL certificate is not trusted by the client.
For testing purposes, disable SSL validation in your ASP.NET Core application temporarily but not recommended for production environments as it introduces security risks.