I have a worker role running and checking to see if data exists in a storage hosted on Azure. My code works when I use the connection string for a classic type of storage, but when I connect to my V2 Azure storage, it throws this exception.
"The remote server returned an error: (400) Bad Request."
while (true)
{
try
{
if (queue.Exists()) // The exception is throw here.
{
try
{
CloudQueueMessage msg = await queue.GetMessageAsync();
if (msg != null)
{
//data manipulation code...
}
}
}
}
}
I'm expecting to be able to use a V2 storage instead of classic as classic is now depreciated on Azure.