gpt4 book ai didi

c# - ArangoDB-NET 错误 : System.Net.WebException: 'No such host is known No such host is known'

转载 作者:行者123 更新时间:2023-12-04 14:49:21 24 4
gpt4 key购买 nike

我正在做一个需要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) 中部署数据库时,驱动程序返回错误。

Error: System.Net.WebException: 'No such host is known No such host isknown'

enter image description here

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

连接字符串设置:

  "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);
}

最佳答案

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
  2. 以管理员身份运行打开 Powershell
  3. certutil -addstore root ca-9676da18.crt

关于c# - ArangoDB-NET 错误 : System.Net.WebException: 'No such host is known No such host is known',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69305937/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com