Skip to content

Latest commit

 

History

History

README.md

AzureBlobStorageExamples - Azure Blob Storage Operations in .NET

YouTube Blog Newsletter All Links LinkedIn

This console application demonstrates practical Azure Blob Storage operations using the Azure.Storage.Blobs SDK for .NET. The examples cover generating Shared Access Signature (SAS) tokens with time-limited permissions, uploading blobs using SAS URIs, downloading blob content, and handling SAS token expiration scenarios.

The code creates a blob with a GUID-based name, generates separate write and read SAS tokens with different expiry windows, and then performs upload and download operations using those tokens. It also includes a scenario that tests what happens when a SAS token expires (using a 5-second read token), making it a useful reference for understanding Azure Blob Storage security patterns and SAS token lifecycle management.

Getting Started

Prerequisites

  • .NET 8.0 SDK or later
  • NuGet package: Azure.Storage.Blobs v12.22.0
  • An Azure Storage account with a connection string

Running the Project

cd AzureBlobStorageExamples.ConsoleApp
dotnet run

You will need to configure a valid Azure Storage connection string before running.

Newsletter

If you found this useful and you want to learn more about C#, .NET, and software engineering, subscribe to the free Dev Leader Weekly newsletter:

Subscribe to Dev Leader Weekly

Connect with Dev Leader


BrandGhost

Powered by BrandGhost 👻