Hello Everyone,
This Azure tutorial consists of 2 parts:
Part 1 - Azure File Storage Tutorial
This is the Part 1 of the tutorial and in this tutorial we are going to discuss about bellow topics.
- Create a Resource Group
- Create a Storage Account
- Create a Container inside Blob Storage
- Generate SAS from Azure Portal
- Use of Windows Azure Storage Explorer
- Generate SAS from Widows Azure Storage Explorer
You can find Part 2 here. (In VB.Net)
If you want to find more information regarding Azure Blob Storage go here.
1. Create a Resource Group
As the first step, we need to create Resource Group.
If you have a existing Resource Group that you want to associate, then you can skip this step.
Click on Add button. (Menu -> Resources Groups)
Give a name to the Resource Group - "rg-azurefilestorage"
2. Create a Storage Account
Next we need to create a Storage Account.
Click on Add button. (Menu -> Storage Accounts)
Select the Resource Group we created earlier from the drop down menu
Give a name to the File Storage - "saazurefilestorage"
We can view the Properties of the newly created Storage Account.
3. Create a Container inside Blob Storage
On the new Storage Account we created click on Blobs.
Click on Add Container button.
Give a name to the Container - "app-data"
4. Upload blobs to the Container
Go inside the new Container we created earlier and click on Upload button.
Blob properties can be viewed by clicking on "..." button.
5. Generate SAS from Azure Portal
We can share a file in a Blob Storage by generating a SAS.
We can set bellow properties on SAS:
- Permission - (Read, Create, Write, Delete) What permissions we provide to the shared file URL
- Start and expiry date/time - From which date/time To which date/time shared file URL is valid
- Allowed IP addresses
- Allowed protocols - HTTPS or HTTP
- Signing key - Key 1 or Key 2
So above Shared File URL is valid:
From 2019-05-03 2:55.51 PM To 2019-05-03 2:57:51 PM
Shared URL will look something like this:
Bellow will be the token:
sp=r&st=2019-05-03T04:55:51Z&se=2019-05-03T04:57:51Z&spr=https&sv=2018-03-28&sig=oRh29xd505Eo%2Bieb%2BXMlRWgj4ZjkSnGhEgUpSGHfBgA%3D&sr=b
We can view the file content by pasting URL to a browser:
If we try to view that file out side the specified valid time frame we will be prompted with bellow error.
6. Use of Windows Azure Storage Explorer
Got to Windows and type Azure Storage Explorer on the Windows search.
To add a account click on Add Account.
Select the option "Use a storage account name and key"
You can get the storage account name and key for the previously created Storage Account through Azure Portal.
Go to Access keys under Storage Account.
Also you can upload folders through Windows Azure Storage Explorer. (folder upload is not available through portal at the moment)
Select Upload Folder.
6. Generate SAS from Widows Azure Storage Explorer
Right click on the file.
Hope you enjoy the tutorial !!
You can find the Part 2 here.
Add a comment