Skip to content

Accessing Blob Containers #2252

Answered by blueww
DreamDelerium asked this question in Q&A
Discussion options

You must be logged in to vote

I tried to run you code, and find 2problems:

  1. the StringToSign is wrong, account name should appear twice in it for emulator, see details
  2. You have added ""SharedKey devstoreaccount1:" 2 times in Authorization header, which makes the header format is wrong.

To fix this, 2 lines of your code need change:

  1. + "/{0}/{1}/{2}", Account, Container, blob); should change to + "/{0}/{0}/{1}/{2}", Account, Container, blob);
  2. client.Headers.Add("Authorization", $"SharedKey devstoreaccount1:{authorization}"); should change to client.Headers.Add("Authorization", authorization);

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@DreamDelerium
Comment options

Answer selected by DreamDelerium
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants