Getting Error in communication with the Azure Blob Storage from .Net Application

Abhi Kansagra 0 Reputation points
2024-10-23T09:27:44.7833333+00:00

I have been using Azure Blob Storage with my .net application and I am uploading and downloading files (mostly in .pdf format) in the storage. But recently it started throwing exception related to authentication. I'm attaching the errors' screenshots here.

Below method from Azure.Storage.Blobs is being used.
public virtual async Task<Response<BlobContentInfo>> UploadAsync(Stream content) => await UploadAsync(content, CancellationToken.None).ConfigureAwait(false);

User's image

User's image

User's image

Kindly help in knowing the possible reason behind this issue and its resolution. Please let me know if more information on this is required.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
Developer technologies .NET Other
{count} votes

2 answers

Sort by: Most helpful
  1. Nehruji R 8,181 Reputation points Microsoft External Staff Moderator
    2024-10-23T10:07:54.11+00:00

    Hello Abhi Kansagra,

    Greetings! Welcome to Microsoft Q&A Forum.

    A 403-status code typically signifies that the request was understood by the server, but the server is refusing to authorize it. Since this issue is happening randomly and resolves on its own after a few minutes, it suggests that the authorization configuration might be inconsistent or that there are intermittent issues with the Azure service or your network.

    If your application is using tokens for authorization, the tokens may be expiring or not being refreshed properly, leading to occasional failures.

    If the issue is related to a storage account which I presume, try regenerating the storage account access keys and updating your application with the new keys.

    Also, verify that no network or firewall rules are blocking the connection. You might need to allow access from all networks temporarily to test if this resolves the issue.

    Hope the above information helps! please let us know if you have any further queries. I’m happy to assist you further.


    Please "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.

  2. Abhi Kansagra 0 Reputation points
    2024-10-23T17:35:25.26+00:00

    Thank you for the response!

    It is now resolved. The issue was related to the firewall rules. After allowing all networks it started working fine. Anyways, having authentication access via shared key is good and will also work without any issue.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.