EF Core迁移 (provider: SSL Provider, error: 0 – 证书链是由不受信任的颁发机构颁发的。)
在数据库迁移过程中,Add-Migration 执行时正常,当执行更新命令 Update-Database 时提示如下错误:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - 证书链是由不受信任的颁发机构颁发的。)
解决办法:字符串中添加 Encrypt=True;TrustServerCertificate=True; 即可