Hi,
I want my worker role to be deployed to Azure Domain (VNET). Hence I have added NetworkConfiguration tag to .cscfg file of my Worker role and successfully deployed to Azure. This worker role has the code to communicate with Azure Service bus. The QueueClient.Receive() method generates an exception given below:
Exception: System.UnauthorizedAccessException: The token provider was unable to provide a security token while accessing ‘https://mycloudservice-ns-sb.accesscontrol.windows.net/WRAPv0.9/’. Token provider returned message: ‘The request was aborted: The request was canceled.’,
It seems that when worker role belongs to VNET then it does not have permission to receive message from Service Bus. Then I tried to remove NetworkConfiguration from Worker role and deploy it again. Then it’s working fine. Hence it seems that some additional security configuration is required in the ACS Management Portal to allow receiving messages from Azure Service Bus.
Anybody can help with some specific configuration that is required to achieve communication from a worker role located in VNET to Azure Service Bus.
ThanksAjay Chawla