Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
373 views
in Technique[技术] by (71.8m points)

rest - "404 Resource Not Found" From Azure Blob Storage Document from PUT

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.

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)?

Edit to Add:

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.

question from:https://stackoverflow.com/questions/18139415/404-resource-not-found-from-azure-blob-storage-document-from-put

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...