gpt4 book ai didi

azure-cosmosdb - 连接字符串缺少必需的属性 : AccountEndpoint error while using the new CosmosClient(CosmosConnectionString)

转载 作者:行者123 更新时间:2023-12-05 06:14:29 24 4
gpt4 key购买 nike

我收到 The connection string is missing a required property: AccountEndpoint 错误,同时将 new CosmosClient(CosmosConnectionString) 构造函数用于 CosmosClient程序集 Microsoft.Azure.Cosmos.Client, Version=3.11.0.0 - 如何修复?该帐户的连接字符串如下所示(缺少 AccountEndpoint:

DefaultEndpointsProtocol=https;AccountName=devdb;AccountKey=xxxx;TableEndpoint=https://devdb.table.cosmos.azure.com:443/;

最佳答案

您指定的连接字符串用于连接到 Azure 存储帐户(当您使用 Azure.Storage.* Nuget 包时)或针对 Table API 的 Cosmos DB 帐户(当您使用 ( Microsoft.Azure.Cosmos.Table 包)。

要使用 Microsoft.Azure.Cosmos 包连接到 Cosmos DB 帐户,必须在 AccountEndpoint=https://account-name.documents.azure.com 中指定连接字符串: 443/;AccountKey=account-key; 格式。

关于azure-cosmosdb - 连接字符串缺少必需的属性 : AccountEndpoint error while using the new CosmosClient(CosmosConnectionString),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62872969/

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