I am unable to perform any File Service related operations on a Storage V2 account with ZRS redundancy. As far as I know, Storage V2 ZRS accounts support File Service.
If I try to list file shares in that storage account or try to create a file share in that account, storage service returns me 400 error back stating one of the request header's value is invalid.
The service is complaining about x-ms-version
header and the value it is complaining about is 2018-03-28
which I believe is the correct value (https://learn.microsoft.com/en-us/rest/api/storageservices/version-2018-03-28).
I have tried with Node SDK (2.10.0) as well as .Net SDK (version 9.3.2) and I am consistently getting the same result in both places.
The code I am using is relatively simple:
var account = CloudStorageAccount.Parse("my-connection-string");
var client = account.CreateCloudFileClient();
var shares = client.ListShares().ToList();//Getting 400 error here.
In my node application, I am getting following error back:
{
"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"
}
The same code would work for a Storage V2 account with other redundancy (RAGRS for example).
I am wondering if I am doing anything wrong or missing out on something.
This seems to be happening with WindowsAzure.Storage 9.3 version client only. Try installing WindowsAzure.Storage 9.2 and it seems to work fine. 9.3 is pointing to x-ms-version "2018-03-28" and 9.2 is pointing to x-ms-version "2017-11-09" which seems to work fine. (https://learn.microsoft.com/en-us/rest/api/storageservices/protocol-version-support-for-.net-client-library-versions)
I am guessing this is an issue Microsoft needs to fix.
Also, trying to access "Access Policy" of File Share in V2 ZRS storage account is throwing error in Azure Portal. They could be linked