本文介绍了“找不到404资源";来自PUT的Azure Blob存储文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试执行PUT请求以创建新的BLOB.在对Authorization标头进行一些初始麻烦之后,当我尝试将文件放入容器时,我现在收到404 Resource Not Found错误.

I'm attempting to do a PUT request to create a new BLOB. After some initial trouble with Authorization header, I am now getting a 404 Resource Not Found error when I attempt to PUT a file into a container.

我很确定自己拥有正确的URL:

I feel rather certain that I have the URL right:

https://accountNameHere.blob.core.windows.net/containerNameHere

我已经检查并重新检查以确保我包括了容器名称和帐户名称,并且它们都是正确的.

I have checked and re-checked to make sure that I'm including the container name and the account name, and they're both correct.

还有什么可能导致这种情况(除了我做错的可能性很明显之外)?

What else could be causing this (aside from the distinct possibility that I'm doing it all wrong)?

编辑以添加:

以下是原始请求标头:

PUT /testss HTTP/1.1
Host: accountName.blob.core.windows.net
Accept: */*
Connection: Keep-Alive
0: content-encoding
1: content-language
2: content-length
3: content-md5
4: content-type
5: date
6: if-modified-since
7: if-match
8: if-none-match
9: if-unmodified-since
10: range
x-ms-blob-type: BlockBlob
x-ms-version: 2011-08-18
x-ms-date: Fri, 09 Aug 2013 04:17:59 GMT
Content-Length: 126377
Authorization: SharedKey accountName:MBVLmoxzxZr+tf8EZw2GkbFLEHuNn8FNAaEHrcty/cM=
Expect: 100-continue

这是我发送的签名字符串:

Here is the string to sign that I sent:

PUT x-ms-blob-type:BlockBlob x-ms-date:Fri, 09 Aug 2013 04:03:20 GMT x-ms-version:2011-08-18 /accountName/test

这是他们的期望:

PUT 126377 x-ms-blob-type:BlockBlob x-ms-date:Fri, 09 Aug 2013 04:02:17 GMT x-ms-version:2011-08-18 /accountName/test

两者之间的唯一区别是PUT之后的126377.那就是文件的内容长度,我不确定如何删除它.

The only difference between the two is the 126377 after PUT. That's the content length of the file, I'm just not sure how to remove it.

推荐答案

您是否检查了Blob容器的安全设置?可能是您没有足够的访问权限.

Have you checked the security settings of the Blob container? It might be that you don't have enough access rights.

这篇关于“找不到404资源";来自PUT的Azure Blob存储文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 20:41