Using Windows Azure ServiceBus behind a corporate firewall

If you're using Windows Azure ServiceBus behind a corporate firewall, and you just use the default settings the SDK provide you with, you might find yourself in a situation where the initial connection to the services takes forever (21 seconds on average for me). This is because it, by default, uses TCP connectivity and tries to communicate on ports that we have blocked.

To, instead, use HTTPS as transport, run this code in the startup of your application:

Connection time down to near-instant. Yay!

The ConnectivityMode also includes a HTTP mode.

Comments

Popular posts from this blog

Auto Mapper and Record Types - will they blend?

Unit testing your Azure functions - part 2: Queues and Blobs

Testing WCF services with user credentials and binary endpoints