Hello friends, in this article, I will discuss the solution to the .Net Core Entity Framework Certificate Error.
After creating our database context file with Entity Framework Code First, we need to perform Migration operations. With Migration, we ensure the creation of our database. However, when performing Migration operations, we may encounter a certificate error. The solution for this is as follows.
While performing Migration operations, you may encounter an error like the following.
If you receive an error message like “A connection was successfully established with the server, but then an error occured during the login process.” you can resolve this issue by adding the following to your Connection String.
TrustServerCertificate=True
When we set the TrustServerCertificate value to true, we can fix the mentioned error and successfully perform our migration operations.
I hope this is helpful.
See you in the next article…