【发布时间】:2019-04-02 08:37:55
【问题描述】:
我无法对 具有 ZRS 冗余的 Storage V2 帐户执行任何文件服务相关操作。据我所知,Storage V2 ZRS 账户支持文件服务。
如果我尝试在该存储帐户中列出文件共享或尝试在该帐户中创建文件共享,存储服务会返回 400 错误,说明请求标头的值之一无效。
服务抱怨 x-ms-version 标头,它抱怨的值是 2018-03-28,我认为这是正确的值 (https://docs.microsoft.com/en-us/rest/api/storageservices/version-2018-03-28)。
我已经尝试过使用 Node SDK (2.10.0) 和 .Net SDK(版本 9.3.2),并且在这两个地方我始终得到相同的结果。
我使用的代码比较简单:
var account = CloudStorageAccount.Parse("my-connection-string");
var client = account.CreateCloudFileClient();
var shares = client.ListShares().ToList();//Getting 400 error here.
在我的节点应用程序中,我收到以下错误:
{
"name": "StorageError",
"message": "The value for one of the HTTP headers is not in the correct format.\nRequestId:86e34bf5-xxxx-xxxx-127d-6ff6df000000\nTime:2018-10-29T11:50:04.4965123Z",
"code": "InvalidHeaderValue",
"headername": "x-ms-version",
"headervalue": "2018-03-28",
"statusCode": 400,
"requestId": "86e34bf5-xxxx-xxxx-127d-6ff6df000000"
}
相同的代码适用于具有其他冗余(例如 RAGRS)的 Storage V2 帐户。
我想知道我是否做错了什么或错过了什么。
【问题讨论】:
标签: azure azure-storage azure-storage-files