首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >连接字符串缺少必需的属性:使用新CosmosClient(CosmosConnectionString)时出现AccountEndpoint错误

连接字符串缺少必需的属性:使用新CosmosClient(CosmosConnectionString)时出现AccountEndpoint错误
EN

Stack Overflow用户
提问于 2020-07-13 17:28:12
回答 1查看 1.9K关注 0票数 2

我在使用带有汇编Microsoft.Azure.Cosmos.Client, Version=3.11.0.0CosmosClientnew CosmosClient(CosmosConnectionString)构造函数时遇到了The connection string is missing a required property: AccountEndpoint错误-如何修复它?帐户中的连接字符串如下所示(缺少AccountEndpoint:

代码语言:javascript
复制
DefaultEndpointsProtocol=https;AccountName=devdb;AccountKey=xxxx;TableEndpoint=https://devdb.table.cosmos.azure.com:443/;
EN

回答 1

Stack Overflow用户

发布于 2020-07-13 17:35:24

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

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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62872969

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档