Did you know…? You can get Azure Storage connection strings from Visual Studio

More than once I have been looking for the format of the connection string to access to a Microsoft Azure Storage account using code. If you are working with a Microsoft Azure solution is easy, because from the role configuration you can create settings and automatically generate the connection string:

Azure Storage connection string

But sometimes we are working with other applications that are not directly linked with Microsoft Azure and the portal only gives us the account name and key:

Manage Access Key without connection strings

A few days ago I realized that, if we access to the properties’s account of the Storage from the Server Explorer we can get the connection string from Visual Studio:

Storage Account Properties

If you click on the ellipsis, we can see the connection string, and even choose between the primary and secondary key in order to generate it:

Storage Account Connection String

Hope this helps.

Happy clouding!