Hey,
I've encountered an issue trying to retrieve messages from the service bus.
The scenario when i encounter this problem is when the app its running on a POS(Point of Sale) in another city. If i run the application on my pc it works perfectly even when i try to run it on a POS in the same office.
The exception i get is this:
System.UnauthorizedAccessException: 40105: Malformed authorization token.
The exception is thrown when i use
await SubscriptionClient.ReceiveAsync();
The subscription client is instantiated like this
var runtimeUri = ServiceBusEnvironment.CreateServiceUri("sb", _serviceBusConnectionData.ServiceBusNamespace, string.Empty); var mf = MessagingFactory.Create( runtimeUri, TokenProvider.CreateSharedAccessSignatureTokenProvider("key", _serviceBusConnectionData.SecurityKey) ); SubscriptionClient = mf.CreateSubscriptionClient(topicName, subscriptionName);
I have no idea why this is happening and i cannot replicate it, it happens only on the POS and that being in another city.
Does anybody have any ideas?