The remote server returned an error: (400) Bad Request. Azure Blob

Azure Cloud Blob Storage Bad Request Error while Uploading and Downloading files

September 29, 2020

In this article we will cover how to resolve Error "The remote server returned an error: (400) Bad Request" while uploading or downloading data from Azure Cloud Blob Storage (CloudBlockBlob)

There are certain default settings applied to Blob Storage. While coding we need to check whether we have implemented code based on these settings.

To resolve mentioned issue, try below mentioned ways.

1) Check for the TLS Protocol applied for storage inside settings.

Add Required TLS Protocol inside your code as mentioned below.

System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls | System.Net.SecurityProtocolType.Tls11 | System.Net.SecurityProtocolType.Tls12;

2) Check for the HTTPS settings. If this is enabled, then your domain must be secure to access Azure Storage

If the domain is not secure then disable this from settings

3) Check for Container Name. It should be exactly same and lower case.

Follow naming rules mentioned here while creating blob Container

Post Comments(0)

Leave a reply

Will not be displayed in comment box .

Loading...