I have a series of blobs which I would like to process. My program is getting a 404 error, throwing an exception like this:
ErrorCode:BlobNotFound
ErrorMessage:The specified blob does not exist.
The access policy on the container is set properly, and when I paste the logged URI into my browser (for instance, this: https://atpblob.blob.core.windows.net/darkskydata/plot1251time2010-01-02t00:00:01z.json
), it downloads fine.
Here is the relevant code:
Console.WriteLine(daily.BlobUri);
CloudBlockBlob blockBlob = container.GetBlockBlobReference(daily.BlobUri);
string text;
using (var memoryStream = new MemoryStream())
{
blockBlob.DownloadToStream(memoryStream);
text = System.Text.Encoding.UTF8.GetString(memoryStream.ToArray());
}
Console.WriteLine(text);
What am I doing wrong?