我创建了一个新的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 });
Quickstard示例附带了应用程序上填写的端点和authKey。配置文件:
如何解决?