Skip to content

Instantly share code, notes, and snippets.

@gbellmann
Created April 13, 2015 00:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save gbellmann/53457a7bcde071ab1709 to your computer and use it in GitHub Desktop.
Function to get an Azure Storage account from the configuration settings
using Microsoft.WindowsAzure.ServiceRuntime;
using Microsoft.WindowsAzure.Storage;
public static CloudStorageAccount GetAccount()
{
const string configName = "StorageConnectionString";
string value = RoleEnvironment.GetConfigurationSettingValue(configName);
return CloudStorageAccount.Parse(value);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment