San

San

  • NA
  • 804
  • 325.2k

No valid combination of account information found

Mar 28 2019 6:27 AM
Here is the scenario i am doing. I have a function app, in which i have specified azure service bus connection string and i am trying to call that connection string. Every time i call that it throws me this error 'No valid combination of account information found". What can it be, why is it throwing this error?
 
CloudQueueClient queueClient = null;
string serviceBus = "Endpoint=sb://xyzservicebus.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=xxxxxx";
string serviceQueue = "Endpoint=sb://xyzservicebus.servicebus.windows.net/;SharedAccessKeyName=processqueuepolicy;SharedAccessKey=xxxxxx=;EntityPath=processqueue";
serviceBus = serviceQueue;
// CloudStorageAccount storageAccount = null;
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(serviceBus);
if (CloudStorageAccount.TryParse(serviceBus, out storageAccount))
{
queueClient = storageAccount.CreateCloudQueueClient();
storageAccountQueue = queueClient.GetQueueReference("processqueue");
await storageAccountQueue.AddMessageAsync(new CloudQueueMessage(message));
}
}