Azure堆栈表存储:HTTP标头的值格式不正确 [英] Azure Stack Table Storage: Value for HTTP headers not in correct format

查看:67
本文介绍了Azure堆栈表存储:HTTP标头的值格式不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试访问天蓝色堆栈的数据存储.以下说明有效:

I am trying to access a data storage of the azure stack. The following instructions work:

BlobClient = StorageAccount.CreateCloudBlobClient();
CloudBlobContainer myContainer = BlobClient.GetContainerReference("mycontainer");

但是通过myContainer.CreateIfNotExists()创建Blob时,它会崩溃:

But it crashes, when creating the Blob via myContainer.CreateIfNotExists():

... StatusMessage:HTTP标头之一的值不在 正确的格式.\ r \ n ErrorCode:\ r \ nErrorMessage:值之一 HTTP标头的格式不正确.\ n RequestId:"hiddenId" ...

...StatusMessage:The value for one of the HTTP headers is not in the correct format.\r\n ErrorCode:\r\nErrorMessage:The value for one of the HTTP headers is not in the correct format.\n RequestId:"hiddenId"...

队列和表的行为完全相同.

The behavior is exactly the same for Queues and Tables.

我尝试了较旧的版本7.2.1,版本8.7和当前版本9.1的"Microsoft.WindowsAzure.Storage"库. (对于文档.其他文档甚至说,在6.2.0和8.7.0之间的每个版本都应该兼容.肯定不支持9.1.)最后,总是上述错误.

I tried the "Microsoft.WindowsAzure.Storage" library in its older version 7.2.1, version 8.7 and the current version 9.1. (8.7 should be fine regarding this documentation. Another documentation even sais, that every version between 6.2.0 and 8.7.0 should be compatible. 9.1 is not supported for sure.) In the end it is always the above error.

定位公共Azure存储而不是Azure Stack存储时,代码运行良好.

The code runs fine when targeting public Azure storages instead Azure Stack storages.

推荐答案

所以我终于找到了在Microsoft的大力支持下的解决方案.

So I finally found out the solution with kind support of Microsoft.

这确实是一个版本控制问题,在理解

It was indeed a versioning problem, one can find out when understanding this documentation the right way.

我正在使用Azure Stack版本1.0.180103.2.这是内部版本号,表示它是在2018年1月3日创建的.这是指文档中使用的版本控制方案中的版本1801.

I am using Azure Stack version 1.0.180103.2. This is the internal version number an means it has been created on the 3rd of January 2018. This refers to version 1801, in the versioning scheme used within the documentation.

API版本8.7仅从1802开始有效.因此,我必须在上一页"下查看该文档页面的底部.可以看到,我必须回到"Microsoft.WindowsAzure.Storage"库6.2.使用此库,它可以工作.

The API version 8.7 is only valid from 1802 on. So I have to look at the bottom of that documentation page under "previous". And there one can see that I have to go back to "Microsoft.WindowsAzure.Storage" library 6.2. Using this library it works.

这篇关于Azure堆栈表存储:HTTP标头的值格式不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆