During a PUT
request, with the proper Authorization header, which creates a new BLOB, my process is getting a "404 Resource Not Found" error when I attempt to PUT
a file into a container.
https://accountNameHere.blob.core.windows.net/containerNameHere
The container name and the account name are both correct.
Why is it failing?
Here are raw request headers:
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
And here is what they expected:
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
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.
Have you checked the security settings of the Blob container? It might be that you don't have enough access rights.
1 - In the Azure Storage Explorer application do these steps to change/verify access.
Set Public Access Level
Public read access for blobs only
.OR 2 - or In the Azure Portal Panel select
Storage account
> Blob service
Section Select " Blob
" >Access policy
" >Blob
" or " Container
" anonymous access based on your needsCheck your container. In the new portal, click the ellipses next to it and Edit. Then set the Access type to either Blob or Container if you want to allow listing of the container.
Microsoft seems to have bumped up the security and made new containers private by default.
You should use Fiddler to verify that you are sending the request you think you are. You can then compare the Fiddler request with the documentation.
Does the container already exist? It is worth using a 3rd-party storage explorer to verify that it does.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.