locked
Exposing an WCF Relay Service through a corporate firewall RRS feed

  • Question

  • Hi all,

    I'm trying to expose an on-premise WCF Service endpoint as a relay on the Windows Azure Service Bus.

    After lots of research, I figured that the minimum requirements for exposing a WCF service as a relay is to enable outbound connections through the firewall for HTTP port 80, HTTPS port 443 and TCP port 9351, using the basicHttpRelayBinding. Other bindings have various similar, but often additionnal requirements.

    Since I cannot obtain approval for opening up outbound TCP ports above and beyond HTTP/HTTPS, I have to use a HTTP/SSL tunnel to route all traffic to the service bus.

    I have been able to setup a very simple tunnel client and server that, with proper redirections, allow me to successfully :

    - run the Microsoft SQL Server Management Studio against a remote SQL Azure database instance (port 1433).
    - run the Microsoft Remote Desktop Connection against a remote Web Role instance (port 3389).

    Now, I'm stuck making this work for exposing a WCF service endpoint on the Service Bus.

    - Tried to force ConnectivityMode.Http : but that does not even go through the tunnel - for obvious reasons.
    - Therefore, tried to force the ConnectivityMode.Tcp : TCP Error 10060! Basically a timeout after roughly 21 seconds or 59 seconds (depending upon the exact moon phase, the age of the captain and probably other factors). Exact message is : The socket transfer timed out after <some short time>. You have exceeded the timeout set on your binding. The time allotted to this operation may have been a portion of a longer timeout.

    The tunnel can be setup to route traffic using .net remoting, with various combinations of [soap/binary] and [http|https|tcp].

    I have tried most sensible combinations, but with the same result.

    Obviously, using HTTP does not go through the TUNNEL at all.
    Likewise, I cannot setup the TUNNEL to use arbitrary TCP ports since the corporate firewall is closed.

    Only options are soap or binary on HTTPS.

    At this point, I think the problem does not come from the tunnelling software I'm using (http://sourceforge.net/projects/bdtunnel/) but mostly on my WCF service implementation, network and Azure related issues.

    Has anyone successfully exposed a WCF service endpoint throught an HTTP/SSL tunnel to the Windows Azure Service Bus ?

    Monday, June 25, 2012 3:18 PM

All replies

  • You can download some ServiceBus sample code from http://servicebus.codeplex.com/

    Tuesday, June 26, 2012 5:31 AM
  • Hi "New GYW",

    Thanks for your feedback. Can you be a bit more specifc ? Which, of the various samples and training kits I have tried, contains an example that works through a firewall/tunnel ?

    Wednesday, June 27, 2012 12:09 PM