BizTalk Service: Exposing data through Hybrid Connections

Introduction

A new addition to the Microsoft Azure BizTalk Service is Hybrid Connections. This feature provides you with the capability to easily create a connection between your on-premise data and/or services and your Azure Website or Mobile Service. The goal of the hybrid connections is to create a seamless connected environment, where your data is easily accessible regardless of its location.

BizTalk Server the counterpart of the cloud BizTalk Service has offered similar ways of exposing or providing access to on-premise data or services. This can be accomplished by creating endpoints and have them registered with the service bus through the relay binding or IIS using, for instance, using the WCF-BasicHttp binding. Instead of using BizTalk Server you can setup and configure access to your data through the BizTalk Service. This can be more a more cost-effective, and faster way to have connectivity with your on-premise data in SQL Server than using BizTalk Server.

This TechNet Wiki article will demonstrate the setup of Hybrid connections as a new approach of accessing your on-premise data.

Setup a Hybrid Connection

To be able to create a Hybrid Connection to an on-premise SQL Server database you will need to provision a BizTalk Service first. In case you a have a BizTalk Service available in your Azure Subscription you can create a Hybrid Connection through the Hybrid Connections tab. There is currently a free (preview) version available for BizTalk Service that supports Hybrid Connections. So you can provision a BizTalk Server for free. Here you can click CREATE A HYBRID CONNECTION.

http://i208.photobucket.com/albums/bb152/Steef-Jan/HybridConnections1_zps98d21ef7.png

Picture 1. Create a Hybrid Connection through the Windows Azure Portal.

The next step is to specify the Name and Host Name for your hybrid connection and set Port to 1433 in a window that will pop-up.

http://i208.photobucket.com/albums/bb152/Steef-Jan/HybridConnections2_zpse6d5550a.png

Picture 2. Pop-up Window to specify detail for the Hybrid Connection.

You can click the check mark to complete the specification. Now the host name is the name of the on-premises server. This configures the hybrid connection to access SQL Server running on TCP/IP port 1433. Clicking the check mark will result in provisioning of a new hybrid connection with the status On-premises setup incomplete. By clicking the On-Premise Setup you can install the Hybrid Connection Manager, which will enable your on-premises machine to connect to Windows Azure and relay TCP traffic. A window will pop-up again.

http://i208.photobucket.com/albums/bb152/Steef-Jan/HybridConnections3_zps8583d821.png

Picture 3. Install the Hybrid Connection Manager.

Once you click Install and Configure a customized instance of the Connection Manager, which is already pre-configured to work with the hybrid connection you created in the previous steps.

http://i208.photobucket.com/albums/bb152/Steef-Jan/HybridConnections8_zps630449d4.png

Picture 4. Installation of the Microsoft Azure Hybrid Connection Manager.

The installation of the Hybrid Connection manager will lead to a situation outlined below.

http://i208.photobucket.com/albums/bb152/Steef-Jan/HybridConnections15_zps5998814f.png

Picture 5. The Hybrid Connection Manager on-premise.

The Hybrid Connection Manager (which can be download separately) can be viewed as a proxy between your application or service in Microsoft Azure. As soon as the installation completes you will see connection endpoint being displayed.

http://i208.photobucket.com/albums/bb152/Steef-Jan/HybridConnections9_zps7d94bd4e.png

Picture 6. Completion of the Hybrid Connection Manager installation.

The status of the Hybrid Connection will show "Connected" after awhile. You will need to refresh the portal.

http://i208.photobucket.com/albums/bb152/Steef-Jan/HybridConnections7_zps3ba68073.png

Picture 7. Completion of the Hybrid Connection showing the status 1 Instance Connected.

Once the connection is up you can make use of it.

Alternative way to set up the Hybrid Connection Manager

An alternative way to setup the Hybrid Connection Manager is to download it and install it on your machine. You will find the installation files in "C:\Program Files\Microsoft\HybridConnectionManager\0.4" (see picture below).

Picture 8. Installation of the Hybrid Connection Manager

Subsequently, you open the Microsoft.HybridConnectionManager.Listener.exe and add the on-premise connection string in the connection string section as shown below. The on-premise connection string can be obtained by selecting your hybrid connection in the portal and choose Manage Connections in the bottom pane.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="hybridConnections" type="Microsoft.HybridConnectionManager.Commands.HybridConnectionsConfigurationSection, Microsoft.HybridConnectionManager.Commands" />
  </configSections>
  <hybridConnections>
    <connectionStrings>
      <hybridConnection connectionString="Endpoint=hc://sltn2014.hybrid.biztalk.windows.net/SLTN2014;SharedAccessKeyName=defaultListener;SharedAccessKey=8dqVtC0GXzlUYWCs7fDRxA1v9eLANuAAAjM0HRrtMmo="/>
   </connectionStrings>
  </hybridConnections>
  <startup>
    <requiredRuntime version="v4.0"  />
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
  </startup>
  <runtime>
    <gcServer enabled="true"/>
  </runtime>
 </configuration>

Next, you can execute the power shell command name HybridConnectionManager.psd1 found in the HybridConnectionManager folder. Once you have done that then you will see the Connected status as shown in picture 7. This basically will start Microsoft.HybridConnectionManager.Listener, which is a Windows Service. In the Windows task manager under services (HybridConnectionManager) you can see it running.

Next steps

Once you have your Hybrid Connection up you can use for a Website or Mobile Service. The prerequisites for using Hybrid Connections are:

  • Microsoft Azure Account
  • Visual Studio 2013
  • SQL Server 2014 (EXPRESS)
  • Operating System Windows Server 2008 R2 Standard, Windows Server 2008 Standard, Windows Server 2012, Windows Server 2012 R2 Windows Server 2008 R2 or later

The following article on the Microsoft Azure site can walk you through using the just created Hybrid Connection:

Other resources to explore regarding Hybrid Connections are:

See Also

Another important place to find a huge amount of Azure BizTalk Services related articles is the TechNet Wiki itself. The best entry point is Azure BizTalk Services resources on the TechNet Wiki.

If you are also looking for BizTalk Server related articles, the best entry point is BizTalk Server Resources on the TechNet Wiki