部署连接到RavenDB的ASP NET Core应用程序

问题描述

我正在尝试将 .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);

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...