Developing an API using asp.net
Is it possible to redirect a user to a private azure blob storage? Can i do this using SAS keys or the azure blob SDK?
For example I want to do something like this:
var response = Request.CreateResponse(HttpStatusCode.Moved);
response.Headers.Location = new Uri(bloburl);
return response;
Is it possible to access a private blob by putting a key in the URL? Obviously i dont want to put the master key though.
Yes, it is entirely possible to redirect a user to a private blob. You would need to create a
Shared Access Signature (SAS)
with at leastRead
permission and append that SAS token to your blob URL and do a redirect to that URL.Your code would look something like this: