0

I am getting this error when trying to send data to database in ASP.NET Core 7 MVC:

enter image description here

SSL Provider: The certificate chain was issued by an authority which is not trusted.

I also added to my connection string: TrustServerCertificate=True and still doesn't work.

I tried adding trustservercertificate, changing tcp ip, running ssms as administrator, restarting it etc.

Wiktor Zychla
  • 47,367
  • 6
  • 74
  • 106
Inf
  • 1
  • 2
  • A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - Łańcuch certyfikatów został wystawiony przez urząd, którego nie jest zaufany.) – Inf May 21 '23 at 20:35
  • 1
    Could be a duplicate of [this one](https://stackoverflow.com/questions/17615260/the-certificate-chain-was-issued-by-an-authority-that-is-not-trusted-when-conn) please confirm – Wiktor Zychla May 21 '23 at 21:17

1 Answers1

-1

Can you try adding "Integrated Security=True;" in the connection string and try?

"DefaultSQLConnection": "Data Source=TEST\\SQLEXPRESS;Initial Catalog=test-db;Integrated Security=True;TrustServerCertificate=True;MultipleActiveResultSets=true"
Ajay Managaon
  • 450
  • 2
  • 9