Reputation: 2561
I am using Nuget version WindowsAzure.Storage 8.1.1 when i use the basic code to add message to storage queue. this is the code snipe found online that i use, it fails on 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 has been 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 can see the error message is:
InvalidResourceName
The specifed resource name contains invalid characters. RequestId:7b234b7d-0003-0040-3ba6-be7d43000000 Time:2017-04-26T16:00:04.8251125Z
Upvotes: 3
Views: 1370
Reputation: 71121
Just to close this out properly: Azure Storage Queue names must be all lower-case.
All naming conventions are documented here (a different link than provided in comments).
Upvotes: 4