"The certificate chain was issued by an authority that is not trusted"升级 nuget 包后,我收到此错误



我有多个API项目,我可以成功地。但是WorkerService API项目会抛出以下警告:

Microsoft.Data.SqlClient.SqlException (0x80131904): 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.)

我的连接字符串:

"data source=server ;initial catalog=ECOMDB;persist security info=True;user id=****;password=****;MultipleActiveResultSets=True;App=EntityFramework;"

我已经看到了这篇文章,但是它并没有解决我的问题:"证书链是由一个不受信任的权威机构颁发的";当从Azure网站连接VM角色中的DB时

"data source=server ;initial catalog=ECOMDB;persist security info=True;user id=****;password=****;MultipleActiveResultSets=True;
App=EntityFramework;Encrypt=false;TrustServerCertificate=True;"

Encrypt=false;TrustServerCertificate=True;添加

最新更新