I have developed a webjob which sends messages to Dynamics Marketing by placing them on a service bus queue. I have multiple instances of the webjob running. When I place multiple messages on the service bus queue it works fine when the webjob is deployed in my personal Azure subscription. But when the webjob is executed in the customers azure subscription I receive the below described error message. Any idea how to solve this issue?
Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Program.ProcessQueueMessage ---> NN.CIP.Common.SdkClient.QueuePeekException:
Cannot connect to queues. See inner exception for details. ---> Microsoft.ServiceBus.Messaging.MessagingCommunicationException: Could not connect to net.tcp://[mynamespace].servicebus.windows.net:9354/. The connection attempt lasted for a time span of 00:00:00.
TCP error code 10013: An attempt was made to access a socket in a way forbidden by its access permissions. ---> System.ServiceModel.CommunicationException: Could not connect to net.tcp://[mynamespace].servicebus.windows.net:9354/. The connection attempt
lasted for a time span of 00:00:00. TCP error code 10013: An attempt was made to access a socket in a way forbidden by its access permissions. ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access
permissions at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalBind(EndPoint localEP) at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback
callback, Object state) at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state) at System.ServiceModel.Channels.SocketConnectionInitiator.ConnectAsyncResult.StartConnect() --- End of inner exception stack trace ---