从 Azure Web App 访问本地数据库

Accessing On-Premises database from Azure Web App

请建议我们是否可以从 ASE 后面的 Azure Web App 访问本地 MS SQL 服务器数据库。

我的理解是,我们只需要在防火墙上打开 sql 端口,以便从 ASE 子网连接到本地子网。

你可以,但还有其他方式,例如混合连接:

Within App Service, Hybrid Connections can be used to access application resources in other networks. It provides access from your app to an application endpoint. It does not enable an alternate capability to access your application. As used in App Service, each Hybrid Connection correlates to a single TCP host and port combination. This means that the Hybrid Connection endpoint can be on any operating system and any application, provided you are accessing a TCP listening port. The Hybrid Connections feature does not know or care what the application protocol is, or what you are accessing. It is simply providing network access.

https://docs.microsoft.com/en-us/azure/app-service/app-service-hybrid-connections

其他选择是 VPN 或 Expressroute

https://docs.microsoft.com/en-us/azure/app-service/environment/network-info