Any help on how to access blob container using SAS URL in .net application , It should work in C# 7.3 version
Loading
Any help on how to access blob container using SAS URL in .net application , It should work in C# 7.3 version
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Emily FosterRank #3,495 · 415 reputationPosted Apr 10, 2025, 4:47 AM EDT
To access a Blob Container using a Shared Access Signature (SAS) URL in a .NET application using C# 7.3, you can follow these steps:
1. First, ensure you have the SAS URL for the Blob Container. This SAS URL should include the necessary permissions required to access the Blob Container and its contents.
2. In C# 7.3, you can make use of the Azure Storage SDK to interact with Azure Blob Storage. You can install the Microsoft.Azure.Storage.Blob package via NuGet to get access to the required APIs.
3. Once you have added the necessary NuGet package to your project, you can use the following code snippet as an example to access a Blob Container using a SAS URL:
using Microsoft.Azure.Storage; using Microsoft.Azure.Storage.Blob; using System; class Program { static void Main() { string sasToken = "your_SAS_token_here"; string containerName = "your_container_name_here"; CloudStorageAccount storageAccount = new CloudStorageAccount(new StorageCredentials(sasToken), endPointSuffix: null, useHttps: true); CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient(); CloudBlobContainer container = blobClient.GetContainerReference(containerName); BlobContinuationToken continuationToken = null; do { var results = container.ListBlobsSegmentedAsync(null, continuationToken).Result; continuationToken = results.ContinuationToken; foreach (IListBlobItem item in results.Results) { Console.WriteLine(item.Uri); } } while (continuationToken != null); } }4. Replace "your_SAS_token_here" and "your_container_name_here" with your actual SAS token and Blob Container name in the code snippet.
5. This code will help you list the blobs present in the specified Blob Container using the provided SAS URL.
Make sure to handle exceptions, validations, and further operations based on your requirements in your application. This example demonstrates the basic functionality of accessing a Blob Container with a SAS URL using C# 7.3. Let me know if you need further assistance or have any specific requirements!
Abhishek ChadhaRank #402 · 6.2K reputationPosted Apr 10, 2025, 5:03 AM EDT
I do have the access to chat gpt I came here after doing research on Chat gpt
For your info blobclient is not worked in 7.3