Search code examples
c#wcfazureazureservicebusazure-servicebusrelay

c# make http call to service on premise (behind firewall) using Azure Service Bus


I have a REST service on premise behind firewall, etc. The service is not exposed to the internet. I need to connect securely to that service from the internet.

I am wondering if Azure Service Bus can pass a HTTP Request to a service and return the HTTP Response?

Something like in this horible image bellow.

  • WCF Service Bus Client Service installed on premise
  • Server running in Azure

The server in Azure can issue HTTP request to custom url in premise like: http://intranet.domain.com by using Service Bus Relay.

Is this scenario possible?

enter image description here


Solution

  • You can use Hybrid connections which are a feature of Azure BizTalk Services. This lets your Azure Web or Mobile App access any on-premise resource that uses a static TCP port, such as SQL Server, HTTP Web APIs etc.

    You need to install a listener agent on-premise that can connect to the machine that is running the REST service and the communication happens over a secure connection between the on-premise service and the Azure web app.

    1. Hybrid connections overview
    2. Setting up a hybrid connection