Connect from Azure Web Apps to on-premises SQL Server

MS Techie 2,681 Reputation points
2020-11-29T09:28:50.96+00:00

Hi,

We have connected the on-premises network to azure network via Express Route using Hub-and-spoke network topology.

How to connect from Azure Web apps to on-premises SQL Server ? One option is using Hybrid networking , which i dont want to use.

if i perform VNet integration for my azure web apps , as mentioned below article, can i access on-premises SQL Server directly ?
https://learn.microsoft.com/en-us/azure/app-service/web-sites-integrate-with-vnet

Please help.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,920 questions
0 comments No comments
{count} votes

Accepted answer
  1. SnehaAgrawal-MSFT 18,366 Reputation points
    2020-11-30T14:37:41.5+00:00

    If you are using ExpressRoute, it would be possible to access the OnPremise SQL Database from the App Service by using regional VNet Integration as this enables your app to access resources across Azure ExpressRoute connections.

    You may also refer to this blog might be helpful.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 18,366 Reputation points
    2020-11-30T12:07:50.713+00:00

    Thanks for asking question! You can use the Azure App Service Virtual Network Integration to deploy your application inside a VNet and this enables access from your application to other services, VMs, or databases that are deployed inside the same Vnet.

    If you want to establish the connection the virtual network must have a VPN gateway that is dynamic, VpnGw1 or a higher size, and configure for point-to-site connectivity.

    Once an app service is connected to a virtual network, you can:

    • Enable the app service to talk with Azure virtual machines on that virtual network.
    • Hop to on-premises via site-to-site VPN connections also make by that gateway.

    Please note that The gateway-required VNet Integration feature doesn't integrate an app with a VNet that has an ExpressRoute gateway. If you need to access resources through an ExpressRoute connection, use the regional VNet Integration feature and there is no additional configuration is required for the regional VNet Integration feature to reach through your VNet to on-premises resources. You simply need to connect your VNet to on-premises resources by using ExpressRoute or a site-to-site VPN.

    Also, If you use gateway-required VNet Integration, update your on-premises VPN gateway routes with your point-to-site address blocks. When the site-to-site VPN is first set up, the scripts used to configure it should set up routes properly. If you add the point-to-site addresses after you create your site-to-site VPN, you need to update the routes manually.

    The App Service Environment is other solution where you deploy single-tenant Isolated tier app services plans in an environment that is connected to a virtual network. This means that every instance in the app service plan is already in the virtual network, and can communicate directly with Azure virtual machines in the same network without needing any VPN or hybrid connections.

    You may also refer to below doc link for different use case feature and scenario might be helpful:

    https://learn.microsoft.com/en-us/azure/app-service/networking-features

    More details: https://github.com/uglide/azure-content/blob/master/articles/app-service-web/web-sites-integrate-with-vnet.md

    1 person found this answer helpful.
    0 comments No comments

  2. MS Techie 2,681 Reputation points
    2020-11-30T12:46:32.027+00:00

    From the above answer , i understand that if we use Regional VNet Integration feature for Azure App Service , then we can connect to on-premises SQL Server.

    Please let me know if my understanding is correct .

    1 person found this answer helpful.
    0 comments No comments