In this article you will learn how to create a Container in Azure Storage from MVC Application.
I am working on a MVC application in which I need to work with Microsoft Azure storage. I had a requirement to create an Azure storage container from the MVC application. In this article I will share what I learned about creating a container programmatically. I created the view as shown in the following image. The user must enter the Azure storage account name, Azure storage key and the name of the container to be created. The preceding View is a MVC razor view and it is created using the cshtml as shown below:
Once the View is ready, let us proceed and create an Azure utility class. In this class we will put all the operations related to the Azure storage. But before you do you need to add an Azure storage library to the project. You can use either the NuGet Package Manager or the console to add the library. I am using the console to install the Azure storage library. I have taken the 4.3 version because when this article was written, this was the latest stable version available. Once the package is successfully installed, add the following namespaces.
Diving Into ASP.NET WebAPI