I am trying to use MS Windows Azure queue in windows service to read messages. I am getting below error while creating queuereference,
Exception Info: Microsoft.WindowsAzure.Storage.StorageException at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](Microsoft.WindowsAzure.Storage.Core.Executor.RESTCommand`1, Microsoft.WindowsAzure.Storage.RetryPolicies.IRetryPolicy, Microsoft.WindowsAzure.Storage.OperationContext) at Microsoft.WindowsAzure.Storage.Queue.CloudQueue.CreateIfNotExists(Microsoft.WindowsAzure.Storage.Queue.QueueRequestOptions, Microsoft.WindowsAzure.Storage.OperationContext)
But whereas the same piece of code work as console app.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(GetQueueSource);
CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();
CloudQueue queue = queueClient.GetQueueReference(QueueRef);
queue.CreateIfNotExists(); //getting error at this point
return queue;