unclouding the cloud

(moved from petermannerhultsitblog.wordpress.com – originally dated October 23, 2014 )

Today I would like to share an addition to the documentation for Windows Azure Service Bus. I will start by explaining the different types of errors that you may receive and the different modes to connect to the service bus.

Azure Service Bus is meant to be able to connect in-most-cases without doing any firewall edits which is true in most cases if you use default settings which is similar to

to try to connect to your Azure Service Bus. And the HTTP Mode will outgoing TCP ports for port 80 (HTTP) and 443 (SSL) which will be open on most corporattions.

The HTTP mode is however (much??) slower than the TCP mode so it could be useful in trying to use TCP mode instead. And this is where it is not certain that the Firewall settings on your Corporation will allow it.

Try to set the Service Bus System Connectivity (in the code to)

ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Tcp;

and you may very well get an exception like

Microsoft.ServiceBus.Messaging.MessagingException: No connection could be made because the target machine actively refused it

This indicates a firewall issue. You should then look at opening some TCP ports for outgoing Communication.