关于Blob Container命名规则

// create blob container for images
blobStorage = storageAccount.CreateCloudBlobClient();
CloudBlobContainer container = blobStorage.GetContainerReference("file_upload_folder");
container.CreateIfNotExist();

当执行上述代码后,运行时会抛出一个很奇怪的问题:One of the request inputs is out of range.

Windows Azure:创建云存储Blob Container的注意事项

检查之后发现是blobStorage.GetContainerReference("file_upload_folder"); 这个地方错误。

一般以为文件夹命名字符串和Windows一样,Windows azure太奇怪了,搜索google发现有人遇到同样的问题

 

引用外国论坛的帖子

Windows Azure:创建云存储Blob Container的注意事项

其中提到建议的规则:

a:只能使用小写字母

b:允许数字

c:允许内部单连字号

d:不能保护任何空格

e:不能包含任何标点符号(连字符除外)

 

于是把“file_upload_folder”改成“fileuploadfolder”  OK 搞定!

问题是下划线也算非法字符吗?反正问题解决了,有时间再做实验吧

相关文章:

  • 2021-10-27
  • 2021-12-02
  • 2022-12-23
  • 2021-11-19
  • 2021-06-06
  • 2022-12-23
  • 2021-07-24
猜你喜欢
  • 2021-12-11
  • 2021-06-13
  • 2022-12-23
  • 2021-09-11
  • 2021-10-17
  • 2021-10-21
  • 2021-09-18
相关资源
相似解决方案