Azure Storage Queue Exception

I am using WindowsAzure.Storage 8.1.1 version of Nuget when I am using basic code to add a message to a storage queue. this is the snipe code found on the internet that I am using it fails in queue.CreateIfNotExists ();

CloudStorageAccount storageAccount = CloudStorageAccount.Parse(ConfigurationManager.AppSettings["AzureWebJobsStorage"]);

// Create the queue client.
CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();

// Retrieve a reference to a queue.
CloudQueue queue = queueClient.GetQueueReference("queueName");

// Create the queue if it doesn't already exist.
queue.CreateIfNotExists();

// Create a message and add it to the queue.
CloudQueueMessage couldMessage = new CloudQueueMessage(message);
queue.AddMessage(couldMessage);

      

Using Fiddler here is my request (security set xxx)

PUT https://xxxxxx.queue.core.windows.net/queueName HTTP/1.1
User-Agent: Azure-Storage/8.1.1 (.NET CLR 4.0.30319.42000; Win32NT 10.0.10240.0)
x-ms-version: 2016-05-31
x-ms-client-request-id: 95a86bb9-4438-4bf4-8c42-bed8dca317f1
x-ms-date: Wed, 26 Apr 2017 16:00:03 GMT
Authorization: SharedKey xxxxxxxx:xxxxxxxxxx/xxxxxxxx=
Host: xxxxxxxx.queue.core.windows.net
Content-Length: 0
Connection: Keep-Alive

      

I see an error message:

<Code> InvalidResourceNameCode> The specified resource name contains invalid characters. RequestID: 7b234b7d-0003-0040-3ba6-be7d43000000 Time: 2017-04-26T16: 00: 04.8251125Z

+3


source to share


1 answer


Just to close this right: Azure storage queue names must be in lower case.



All naming conventions are documented here (different link than pointed out in comments).

+4


source







All Articles