connecting to Azure app to OnPrem Database

Arbina Inamdar 86 Reputation points
2022-01-19T18:27:25.957+00:00

I need to deploy a website to Azure Webapp and my databse to which the wesbite connects is in onPrem.

how can I connect this website to database which is present onPrem?

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

Accepted answer
  1. Andriy Bilous 10,896 Reputation points MVP
    2022-01-19T21:18:40.193+00:00

    Hello @Arbina Inamdar

    Your on-premise database is located in your private on-premise network, so Azure WebApp cannot connect to it.
    There are several variants:

    • You could expose a public IP for the on-premise database.
    • Use Azure web app service VNet integration with Azure VPN gateway to securely access the resource in an Azure VNet or on-premise network.
      166561-image.png
    • Another recommended method is to use an Azure App Service Hybrid Connections. To do this, you need to add and create Hybrid Connections in your app. You will download and install an agent (the Hybrid Connection Manager) in the database server or another server which is in the same network as the on-premise database.
      You configure a logical connection on your app service or web app.
      A small agent, the Hybrid Connection Manager, is downloaded and installed on a Windows Server (2012 or later) running in the remote network (on-premises or anywhere) that you need to communicate with.
      You log into your Azure subscription in the Hybrid Connection manager and select the logical connection in your app service.
      The Hybrid Connection Manager will initiate a secure tunnel out (TCP 80/443) to your app service in Azure.
      Your app service can now communicate with TCP-based services, on Windows or Linux, in the remote network via the Hybrid Connection Manager.
      You could get more details on how to Connect Azure Web Apps To On-Premises.
      166513-image.png
    • ExpressRoute and ACE, it would be possible to access the OnPremise SQL Database from the App Service by using regional VNet Integration
      166469-image.png

    https://petri.com/connect-azure-web-apps-premises
    https://stackoverflow.com/questions/54821962/connect-to-on-prem-sql-server-from-azure-web-app/54822402

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Mahalakshmi Subramani 21 Reputation points
    2022-07-14T19:59:42.627+00:00

    @Andriy Bilous we have a similar need and able to get it working for hybrid with sql authentication. Question on ExpressRoute and ACE, it would be possible to access the OnPremise SQL Database from the App Service by using regional VNet Integration, can it support windows authentication/Active Directory authentication to connect to on-prem

    0 comments No comments

  2. Ahmad 1 Reputation point
    2022-09-14T08:37:57.263+00:00

    Dear,

    I have a question,
    the connection to on-premises database was successfully initiated using Regional V-net Integration,
    but in http mode,

    what do i need to do to connect if the server uses SSL certificate?

    0 comments No comments