The specified blob does not exist
Microsoft.WindowsAzure.StorageClient.StorageClientException: The specified blob does not exist.
There are two different scenarios that will throw this exception when trying to call CloudBlob.DownloadText()
. The first, and least interesting, is that the blob reference you are holding on to actually doesn't exist. This is simple enough to check and you probably wouldn't have made it this far in your searching had that been the original problem. I digress.
The second scenario that results in the above error is that you are behind a firewall that blocks outgoing requests to Azure Blob Storage. You can confirm this by running the same code on a different network (I just connected my laptop to my phone's hotspot) and see if everything magically starts working.
The easiest way around this issue is to make sure the baseAddress
property in the CloudBlobClient
object starts with https. You should be doing this anyway.
new CloudBlobClient("https://account.blob.core.windows.net/", credentials);
If this still doesn't work, you will have to punch open port 443 on your firewall or resort to the Get Blob REST API method.