问题描述
我正在尝试将 .NET Core应用部署到连接到 RavenDB 的Azure上,在本地没有问题,因为它需要安装并读取证书在连接初始化时,问题是当它在云中时,会向我显示此错误:
The SSL connection could not be established,see inner exception. -> The credentials supplied to the
package were not recognized (The SSL connection could not be established,see inner exception.
我找不到解决方法,我在生产版本中包括了证书,还从App Service Azure控制面板安装了证书。我真的很想知道如何解决这个问题,在其他地方搜索时找不到解决方案
解决方法
如何在应用程序中加载客户端证书? 尝试使用机器键集标志。
[DocumentStore].Certificate = new X509Certificate2("[client cert path]",(string)null,X509KeyStorageFlags.MachineKeySet);