Accessing Blob Containers #2252
-
Hello. I am trying to access files in my Blob Containers but I keep getting 403 errors. I am trying to run this in Unity, so I am not able to use the Azure SDK's. Using MS Azure Storage Explorer, I can see the containers and files exist and I can confirm the Primary Key. This is the code I have:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Since MS Azure Storage Explorer works, it means Azurite as server side works well. So this looks not an Azurite question, but a question on client side. So our team might not be the best person to answer it. Would you like to get Azurite debug log (details), and you can find the StringToSign Azurite used from debug log, and compare with the one your code get. Besides that, have you tested if your client code works with product Azure storage? If not work, please make sure your code works with public Azure first. |
Beta Was this translation helpful? Give feedback.
-
I tried to run you code, and find 2problems:
To fix this, 2 lines of your code need change:
|
Beta Was this translation helpful? Give feedback.
I tried to run you code, and find 2problems:
To fix this, 2 lines of your code need change:
+ "/{0}/{1}/{2}", Account, Container, blob);
should change to+ "/{0}/{0}/{1}/{2}", Account, Container, blob);
client.Headers.Add("Authorization", $"SharedKey devstoreaccount1:{authorization}");
should change toclient.Headers.Add("Authorization", authorization);