Ton*_*ony 3 c# gremlin azure-cosmosdb
我创建了一个新的 Azure CosmosDB (Gremlin API),然后下载了快速入门示例:
当我运行它时,出现此异常:
JsonReaderException:从 JsonReader 读取 JObject 时出错。路径 '',第 0 行,位置 0。
我检查了一下,端点和 authKey 已设置。
public async Task RunAsync(DocumentClient client)
{
// the line below throws the Exception
Database database = await client.CreateDatabaseIfNotExistsAsync(new Database { Id = "graphdb" });
DocumentCollection graph = await client.CreateDocumentCollectionIfNotExistsAsync(
UriFactory.CreateDatabaseUri("graphdb"),
new DocumentCollection { Id = "Persons" },
new RequestOptions { OfferThroughput = 1000 });
Run Code Online (Sandbox Code Playgroud)
Quickstard 示例附带在 App.config 文件中填写的端点和 authKey:
怎么解决呢?
请将端点更改为此格式https://<account-name>.documents.azure.com:443/
。
这是新创建的 Gremlin 帐户当前存在的问题,很快就会在快速入门中得到解决。
归档时间: |
|
查看次数: |
1422 次 |
最近记录: |