Mongodb C#表示Linux Centos上存在无效证书错误

Mongodb C#表示Linux Centos上存在无效证书错误,mongodb,Mongodb,我们正在使用Linux CentOS中部署的C#API(.NET core版本2.2)中的C#驱动程序“Mongo Db driver 2.9.2”连接到Linux CentOS上部署的Mongo server 4.2。在Mongo上启用TLS,并使用自签名证书。同样的代码和证书在Windows机器上运行,但在Linux上我们得到以下错误。请建议: 使用CompositeServerSelector{Selectors=MongoDB.Driver.MongoClient+AreSessions

我们正在使用Linux CentOS中部署的C#API(.NET core版本2.2)中的C#驱动程序“Mongo Db driver 2.9.2”连接到Linux CentOS上部署的Mongo server 4.2。在Mongo上启用TLS,并使用自签名证书。同样的代码和证书在Windows机器上运行,但在Linux上我们得到以下错误。请建议:


使用CompositeServerSelector{Selectors=MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector,LatencyLimitingServerSelector{AllowedLatencyRange=00:00.0150000}选择服务器30000ms后发生超时。群集状态的客户端视图为{ClusterId:\'1\',连接模式:\'Automatic\',类型:\'Unknown\',状态:\'Disconnected\',服务器:[{ServerId:\'{ClusterId:1,端点:\'Unspecified/ServerName\'}',端点:\'Unspecified/ip ServerName\',状态:\'Disconnected\',类型:\'Unknown\',异常:\"MongoDB.Driver.MongoConnectionException:打开与服务器的连接时发生异常。-->System.Security.Authentication.AuthenticationException:根据验证过程,远程证书无效。\n在System.Net.Security.SSLSState.StartSendAuthResetSignal

中,我们可以使用服务器证书解决此问题证书而不是通配符证书