EF Core DbFirst 报错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

参考: "Password=225225;Persist Security Info=True;User ID=sa;Initial Catalog=MyProject;Data Source=.;Encrypt=True;TrustServerCertificate=True"

posted @ 2023-05-17 13:37  大侠爱吃小龙虾  阅读(121)  评论(0)    收藏  举报