Azure Blob Storage In ASP.NET Core 2.0


How to use Azure Blob storage in ASP.NET Core.


Create a class library and add NuGet package - WindowsAzure.Storage

Add a class to encapsulate settings,

Add a class to encapsulate a blob item,

Now add public methods to upload and download blob items,

Add methods to get a list of blob items,

Inject and use storage helper,


Sample code has a controller with actions for listing, downloading and uploading items.

In ASP.NET Core Web Application, configure services,


The sample code will require you to set up an Azure account, blob storage account, and container. Instructions for these can be found  here.

Source Code