Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 837
user1091949 Avatar asked Aug 09 '13 02:08

user1091949


People also ask

What causes 404 error in Azure Blob?

Status code: 404, description: 'The specified resource does not exist.'. 01-31-2018 11:43 PM From this thread, such an error is caused by authentication failure. Please check whether this folder is existing in Azure blob storage. Also check whether your account is still have access permission to this folder.

How to change blob or blob access permission in Azure Storage explorer?

1 - In the Azure Storage Explorer application do these steps to change/verify access. Set to at least Public read access for blobs only. Apply. Select Blob or Blobs that you want to change the access permission > from the Drop Down menu select " Blob " or " Container " anonymous access based on your needs Check your container.

Why am I getting an Azure Resource Manager error when deploying resources?

Typically, you see this error when deploying resources with a Bicep file or Azure Resource Manager template (ARM template). You also see this error when doing management tasks and Azure Resource Manager can't find the required resource. For example, if you try to add tags to a resource that doesn't exist, you receive this error.

How do I allow read-only access to my Azure Container?

Login to your Azure Portal and navigate to your container. Now, click on the three dots (…) and then Access Policy. According to Microsoft, Access Policy specifies whether data in the container may be accessed publicly. By default, container data is private to the account owner. Use ‘ Blob ’ to allow public read access for blobs.


2 Answers

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

like image 63
Boudewijn van Veen Avatar answered Sep 21 '22 01:09

Boudewijn van Veen


1 - In the Azure Storage Explorer application do these steps to change/verify access.

  1. Right click the container's blob in question
  2. Select Set Public Access Level
  3. Set to at least Public read access for blobs only.
  4. Apply.

enter image description here


OR 2 - or In the Azure Portal Panel select

  • Storage account >
  • from Blob service Section Select "Blob" >
  • Select Blob or Blobs that you want to change the access permission >
  • Select "Access policy" >
  • from the Drop Down menu select "Blob" or "Container" anonymous access based on your needs
like image 42
ΩmegaMan Avatar answered Sep 20 '22 01:09

ΩmegaMan