I\'m trying to connect an Azure website to an Azure blob (where I intend to host some files in a container and then grab them from my website).
I started out with this t
You have a fundamental mistake in your code.
First you set an AppSetting:
Then you try to get a connection string:
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(ConfigurationManager.ConnectionStrings["StorageConnectionString"].ConnectionString);
This will simply not work. When set AppSetting, you need to read AppSetting. When you set ConnectionString, you need to read Connection String.
So, the solution to be just keep the web.config as is, and change the line where you get storage account to:
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(ConfigurationManager.AppSettings["StorageConnectionString"]);
Or keep your line for Connection strings but change web.config to:
And of course, you have to put your real values for Cloud Storage account and Storage Account key (account-name
will simply never work).