无法在Storage V2 ZRS帐户上执行任何文件服务操作-从服务中获取400错误

时间:2018-10-29 12:00:55

标签: azure azure-storage azure-storage-files

我无法在具有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帐户,相同的代码也适用。

我想知道我做错了什么还是错过了什么。

1 个答案:

答案 0 :(得分:1)

这似乎仅在WindowsAzure.Storage 9.3版本客户端中发生。尝试安装WindowsAzure.Storage 9.2,它似乎可以正常工作。 9.3指向x-ms-version版本“ 2018-03-28”,而9.2指向x-ms-version版本“ 2017-11-09”,这似乎工作正常。 (https://docs.microsoft.com/en-us/rest/api/storageservices/protocol-version-support-for-.net-client-library-versions

我猜这是微软需要解决的问题。

此外,尝试访问V2 ZRS存储帐户中文件共享的“访问策略”在Azure Portal中引发错误。它们可以链接