'A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - T

Problem was

and on the browser, the local host isn't working as well.

Solution:

  1. I've added TrustServerCertificate=True to connection string in appsetting.json file.

  2. Now this runs perfectly fine

TrustServerCertificate=True