Access on-premises resources using hybrid connections in Azure App Service
You can connect a web app in Azure App Service to any on-premises resource that uses a static TCP port, such as SQL Server, MySQL, HTTP Web APIs, Mobile Services, and most custom Web Services. This article shows you how to create a hybrid connection between a web app in App Service and an on-premises SQL Server database.
The Web Apps portion of the Hybrid Connections feature is available only in the Azure Portal. To create a connection in BizTalk Services, see Hybrid Connections.
An Azure subscription. For a free subscription, see Azure Free Trial.
To use an on-premises SQL Server or SQL Server Express database with a hybrid connection, TCP/IP needs to be enabled on a static port. Using a default instance on SQL Server is recommended because it uses static port 1433. For information on installing and configuring SQL Server Express for use with hybrid connections, see Connect to an on-premises SQL Server from an Azure web site using Hybrid Connections.
The computer on which you install the on-premises Hybrid Connection Manager agent described later in this article:
- Must be able to connect to Azure over port 5671
- Must be able to reach the hostname:portnumber of your on-premises resource.
The steps in this article assume that you are using the browser from the computer that will host the on-premises hybrid connection agent.
Create a web app in the Azure Portal
In the lower left corner of the Azure Portal, click New > Web + Mobile > Website.
On the Web app blade, provide a URL > Create.
After a few moments, the web app is created and its web app blade appears. The blade is a vertically scrollable dashboard that lets you manage your site.
To verify the site is live, you can click the Browse icon to display the default page.
Next, you will create a hybrid connection and a BizTalk service for the web app.
Create a Hybrid Connection and a BizTalk Service
Scroll down the blade for your web app and choose Hybrid connections.
On the Hybrid connections blade, click Add.
The Add a hybrid connection blade opens. Since this is your first hybrid connection, the New hybrid connection option is preselected, and the Create hybrid connection blade opens for you.
On the Create hybrid connection blade:
- For Name, provide a name for the connection.
- For Hostname, enter the name of the on-premises computer that hosts your resource.
- For Port, enter the port number that your on-premises resource uses (1433 for a SQL Server default instance).
- Click Biz Talk Service
The Create BizTalk Service blade opens. Enter a name for the BizTalk service, and then click OK.
The Create BizTalk Service blade closes and you are returned to the Create hybrid connection blade.
On the Create hybrid connection blade, click OK.
When the process completes, the notifications area in the portal informs you that the connection has been successfully created.
On the web app's blade, the Hybrid connections icon now shows that 1 hybrid connection has been created.
At this point, you have completed an important part of the cloud hybrid connection infrastructure. Next, you will create a corresponding on-premises piece.
Install the on-premises Hybrid Connection Manager to complete the connection
On the web app's blade, click the Hybrid connections icon.
On the Hybrid connections blade, the Status column for the recently added endpoint shows Not connected. Click the connection to configure it.
The Hybrid connection blade opens.
On the blade, click Listener Setup.
The Hybrid connection properties blade opens. Under On-premises Hybrid Connection Manager, choose Click here to install.
In the Application Run security warning dialog, choose Run to continue.
In the User Account Control dialog, choose Yes.
The Hybrid Connection Manager is downloaded and installed for you.
When the install completes, click Close.
On the Hybrid connections blade, the Status column now shows Connected.
Now that the hybrid connection infrastructure is complete, you can create a hybrid application that uses it.
If you want to get started with Azure App Service before signing up for an Azure account, go to Try App Service, where you can immediately create a short-lived starter web app in App Service. No credit cards required; no commitments.
Hybrid Connections overview
Josh Twist introduces hybrid connections (Channel 9 video)
Hybrid Connections web site
BizTalk Services: Dashboard, Monitor, Scale, Configure, and Hybrid Connection tabs
Building a Real-World Hybrid Cloud with Seamless Application Portability (Channel 9 video)
Connect to an on-premises SQL Server from Azure Mobile Services using Hybrid Connections (Channel 9 video)