Cannot upload to azure Blob Storage: The remote server returned an error: (400) Bad Request
Have you tried creating a container manually on azure portal? It has some limitations on what name you can give containers.
For example: Container name cannot contain upper case letters.
If you request a container with an invalid name, it will result in (400) Bad Request, which you are getting. So check your "containerName" string.
I had the same problem. I resolved it by changing the TLS version in the configuration of the storage; the new TLS version (1.2) is not compatible with the older version of the storage client. I changed it to the 1.0 and it works.
The configuration of the storage is in the portal of Azure.
Storage -> Configuration -> TLS Version:
I also got this error with the Azure Storage Message Queues.
The Azure Storage Message Queue names must also be all lowercase. ie: "newqueueitem" name in lowercase.
// Retrieve a reference to a queue.
CloudQueue queue = queueClient.GetQueueReference("newqueueitem");
// Create the queue if it doesn't already exist.
queue.CreateIfNotExists();