1
votes

I need to add Azure Blob Storage functionality in an existing classic ASP .NET website in IIS.

Website :

.NET Framework with Forms authentication, Roles enabled. Hosting Environment : Non Azure Data Centre

Roles

Role 1 : HeadOffice ( Users in the company head office )

Role 2 : CreditCustomer ( all credit customers are assigned this role )

Folders

  1. HO - access given to Role 1. Multiple web forms accessed by Role 1.
  2. Customer - access given to Role 2. Multiple web forms accessed by Role 2.

Functionality needed

Access Azure Blob Storage externally :

1. HO - can read write.

2. Customer - can read/download.

Need functionality where Customer 1 cannot access blobs for Customer 2 and vice versa.

Additional Role can be assigned to every customer.

This is an 2012 article which I think can be modified for my use.

https://www.dotnetcurry.com/windows-azure/803/blob-storage-aspnet-windows-azure

Shall I work with the above or is there an update? Or Shall I explore REST API ?

Whatever I do, I intend to host it in the Data Centre (not in Azure) where the website is currently hosted.

Thanks a lot!

1
.net framework version?Rajdeep Debnath
.NET Framework 4netdev2000
I am having the same problem, I am trying to use microsoft.graph to log the user in via AD before requesting the blob - will let you know if it worksMartin Meeser
do you have cors configured correctly?Martin Meeser

1 Answers

0
votes

You can use Microsoft.Azure.Storage nuget for .NET Framework. The package has been deprecated though and split into smaller package like Azure.Storage.Queue,Azure.Storage.Blobs etc. So you can use the newer packages by creating a .NET Standard separate library and referring the library in your project.

https://www.nuget.org/packages/microsoft.azure.storage.blob/

Other than nuget, you can use REST API also.

https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob

For permission: You can create SAS (shared access signature) for different set of permissions and use different SAS based connection string based on role.