NET6 EF Error: The certificate chain was issued by an authority that is not trusted

发布时间 2023-07-28 10:32:18作者: Robot-Blog

Error

A connection was successfully established with the server, but then an error occurred during the login process.
 (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)

解决方法:

在DB连接字符串后面添加证书信任配置:TrustServerCertificate=true