ignore this please
how to solve the error "Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - La chaîne de certificats a été"
Hi I try to connect my asp.net core api to a sql server database I encounter an error like: "Microsoft.Data.SqlClient.SqlException (0x80131904): 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 provided by an authority that is not trusted.)", this error I encountered long before and had add the following properties: "TrustServerCertificate=True" and "Trusted_connection=True" but I encounter the same error I added these properties but I have the same error, what can cause this?
Developer technologies ASP.NET ASP.NET Core
SQL Server Other
7 answers
Sort by: Most helpful
-
-
Prateek Kumar 0 Reputation points
2024-10-23T08:32:46.6266667+00:00 "TrustServerCertificate=true"
I fixed it by adding "TrustServerCertificate=true" to the connectionString.