ArangoDB-NET错误:System.Net.WebException:'没有已知这样主机没有已知这样主机'

gudnpqoy  于 2022-12-09  发布在  Go
关注(0)|答案(1)|浏览(144)

我正在做一个需要Graph DB的项目。我正在使用C# .Net Core开发这个项目。我不得不选择ArangoDB作为这个项目的Graph DB。不幸的是,没有.Net的官方驱动程序。这就是为什么我选择社区驱动程序。那就是ArangoDB-NET
https://www.nuget.org/packages/ArangoDB-NET/
https://github.com/yojimbo87/ArangoDB-NET
驱动程序与我本地安装的ArangoDB数据库一起工作正常。当我尝试在**ArangoDB Cloud (ArangoDB Oasis)**中部署数据库时,驱动程序返回错误。
错误:系统错误。'没有已知这样主机没有已知这样主机'

请检查以下有关数据库连接的信息:

连接字符串设置:

"DatabaseSettings": {
    "ConnectionName": "CloudDBConnection",
    "Host": "https://xxxxxxxx.arangodb.cloud",
    "Port": 8529,
    "UserName": "root",
    "Password": "xxxxxxxx",
    "DatabaseName": "KKBDTestDB"
  }

数据库连接:

private readonly ADatabase db;
public DatabseService(IDatabaseSettings settings)
{
    ASettings.AddConnection(settings.ConnectionName, settings.Host, settings.Port, false, settings.DatabaseName, settings.UserName, settings.Password, true);
    db = new ADatabase(settings.ConnectionName);
}
qhhrdooz

qhhrdooz1#

1)从主机名中删除https,然后重试。

连接字符串应为:

"DatabaseSettings": {
    "ConnectionName": "CloudDBConnection",
    "Host": "xxxxxxxx.arangodb.cloud",
    "Port": 8529,
    "UserName": "root",
    "Password": "xxxxxxxx",
    "DatabaseName": "KKBDTestDB"
  }

2)从arongodb云下载Windows的公钥,并按照以下步骤操作:

1.将证书(PEM)转换为ca-9676da18.crt
1.以管理员身份运行打开Powershell
1.证书-添加存储根ca-9676da18.crt

相关问题