This article is about Azure SDK and Storage Account in Azure. In this article you will also learn how to store images in Blob storage to Azure. So, let's start with the following three steps:
- How to install Windows Azure SDK in Visual Studio 2013?
- How to install Azure Explorer?
- How to create Storage Account in the Azure Microsoft Account?
How to install Windows Azure SDK in Visual Studio 2013
Step 1: Open Visual Studio 2013, go to Templates, then Visual C# and click Cloud.
Step 2: Select “Get Microsoft Azure SDK for .NET”.
Step 3: In the name section, it will take a default name “MicrosoftAzure1”.
Step 4: Click OK button.
In the following figure, click on “Download Microsoft Azure SDK foe .NET” (shown in red rectangular).
After that the installation will continue as in the following:
Now click “Install” button for further processing:
Now in the following figure, by clicking “I Accept” we agree to the license terms for the third party as in the following:
Click OK button to close your previous applications, which are running in the background:
Now Azure SDK is installing as in the following figure:
Click on the “Continue” button for further installation of SDK.
So, now our SDK is ready for use in Visual Studio 2013.
Click on to the “Finish” button to finish the installation of Azure SDK.
Now we are going to install Azure Explorer.
Azure Explorer: Azure Explorer is a free Microsoft Azure storage tool; in this we can manage all our Microsoft Azure blobs at a common place or one place. Azure Storage Explorer is a useful GUI tool for inspecting and altering the data.
Step 1: For the installation of Azure Explorer we need go to its download link,
After going to above link, you will see the following window. Click “DOWNLOAD AZURE EXPLORER” (in red circle).
In the following figure the installation of Azure Explorer progress can be seen:
After completing the installation, just go in the search box and type Azure Explorer and open it.
You need to check License Agreement, and click on “I Accept” button.
And finally we installed Azure Explorer successfully.
Here we need to add our account with the Azure Explorer, so right click on “Azure Storage Accounts” and choose “Add Connection to Azure Storage”.
So in the following figure it will provide you different options to connect with the storage account, here we need to choose “Connect to Azure with an Storage Account Name and an Access key”.
Click on “Next” button.
So, next window will ask you about “Storage Account Name” and “Storage Access Key”.
Provide the storage account name and storage access key. You will get this information from your Microsoft Azure Account.
Just go to your Microsoft Account login where you can get the name and key from your storage account.
For this, simply go to your Microsoft login page. Here's the screenshot:
Fill the email address and click on “Continue:"
Fill the password detail and click on “Sign in” as in the following figure:
So, for creating a storage account, you need to go to New, Data + Storage, then Storage account.
After clicking on the “Storage account”, you will see the following window.
Here, in the “Select a deployment model” (in the left side of the window), you need to select “Classic” from the dropdown items.
Click on the “Create” button. After clicking, you will see the right portion of the window.
In the Storage option, you need to give your storage account name; here I am giving the storage name “nitindemostorage”, you can give the storage name as your wish.
Finally, click on the “Create” button.
After clicking the “Create” button, you will get the storage account of your name.
And now, simply go to the “Storage” and then “nitindemostorage”, which is my storage account name and then go to the “MANAGE ACCESS KEYS”, for the Storage Account Name and Primary Access Key.
Now you will need to copy the Storage Account Name and Primary Access Key as in the following screenshot:
Now, copy the storage account name and primary access key, and paste over here as in the following screenshot. After that click on the “Test Connection” button.
Connection is successful, so click on
OK button.
Once again click on OK button to proceed.
Finally, we have created our storage account with Azure Explorer. You can see in the red rectangle that is “
nitindemostorage”.
Now we have to create blob storage for accessing services in Azure Storage, so right click on storage account and click on “
New Blob Container”.
Now in the name section, give the name to blob container as you wish, but you can’t use uppercase letters while creating blob storage.
Here I have given “
mysample” name to my blob container.
Now, if you are an owner of your account, choose the “
Private- Access to account owner only” option from the dropdown list.
Click on
OK button.
This will create a blob container.
In the following figure, “
mysample” blob container successfully created. (In the red area).
Here is another blob with name “
$logs”, so don’t worry, since it is created by Azure Storage by default. We will focus on “
mysample” named blob storage.
So, we have successfully created our “
mysample” named blob storage.
Now, I am going to store images in my azure explorer. You can directly paste the image or any file inside the “
mysample” blob.
Here, I am going to paste two images: “
Nitin1” and “
Nitin2” as in the following figure:
Right click on your favorite image and click "
Copy path".
Now you can paste the path in our browser directly.
It gives an error because we need to change the access level of our blob container.
So, right click and choose “
Permissions”.
Here you can choose the “
Blob - Public read access for Blobs” option.
Click on
OK button.
Now again right click on the image and copy the full path.
Paste the copied path in the web browser.
So, finally we will get our image.
Thanks for reading this article and stay tuned with me for the next article “
Using Azure blob storage in ASP.NET." Thanks again.