Site Feedback Post

Single Post Permalink

View Thread: Cannot get "Tired Of Waiting In Line" Azure Achievement to work
  • AceHack

    I've followed the guide here

    Here is my storage connection string "DefaultEndpointsProtocol=https;AccountName=***;AccountKey=***"

    And here is my code that i have successfully debugged locally and tested it works and also deployed to Azure.

            int Queue()
                CloudStorageAccount storageAccount = CloudStorageAccount.Parse(RoleEnvironment.GetConfigurationSettingValue("StorageConnectionString"));
                CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();
                CloudQueue queue = queueClient.GetQueueReference("myqueue");
                CloudQueueMessage message = new CloudQueueMessage("Hello, World");
                CloudQueueMessage retrievedMessage = queue.GetMessage(TimeSpan.FromSeconds(1));
                var msgs = queue.GetMessages(1, TimeSpan.FromSeconds(60));
                msgs.ToList().ForEach(msg => queue.DeleteMessage(msg));
                return 0;