[英]Accessing service on a Virtual Machine from azure app service
We have got VMs on Azure and services are running in there.我们在 Azure 上安装了 VM,并且服务在其中运行。 We are trying to deploy our MVC Web application to Azure App service, which accesses some of the services from the VM using the private IPs but it can't connect to the service hosted on the VM using the private IP.
我们正在尝试将我们的 MVC Web 应用程序部署到 Azure App 服务,该服务使用私有 IP 从 VM 访问某些服务,但它无法使用私有 IP 连接到托管在 VM 上的服务。 We were assuming that all of our resources will be in the same network, can anyone help with this?
我们假设我们所有的资源都在同一个网络中,有人可以帮忙吗?
Thanks谢谢
Azure App service are having two kinds of hostings Azure App 服务有两种托管
If your application is hosted as multi tenant application meaning app service URL {WEbAppName}.Azurewebsites.net then its internet facing application and if it needs to connect to any VNET (Virtual Network) hosted service then it needs to integrate to any or same VNET.如果您的应用程序作为多租户应用程序托管,这意味着应用程序服务 URL {WEbAppName}.Azurewebsites.net 则其面向 Internet 的应用程序,如果它需要连接到任何 VNET(虚拟网络)托管服务,则它需要集成到任何或相同的 VNET .
How to do App service VNET Integration: https://docs.microsoft.com/en-us/azure/app-service/overview-vnet-integration#regional-virtual-network-integration如何进行应用服务 VNET 集成: https ://docs.microsoft.com/en-us/azure/app-service/overview-vnet-integration#regional-virtual-network-integration
Once the App service integrated with VNET then ideally it has connectivity with all the services present inside the same VNET or with peered VNET.应用服务与 VNET 集成后,理想情况下,它可以与同一 VNET 中的所有服务或对等 VNET 连接。
How to confirm connectivity from App Service to VNET hosted resource.如何确认从应用服务到 VNET 托管资源的连接。 Go to App Services application => Advanced tools or console => perform below commands sequence wise as the HTTP communication happens through this sequence:
转到应用服务应用程序 => 高级工具或控制台 => 在 HTTP 通信通过此序列发生时按顺序执行以下命令:
Common Scenarios: If you're receiving connection refused it means its NSG is not allowing the communication.常见情况:如果您收到连接被拒绝,则表示其 NSG 不允许通信。 If you're getting request time out it means it could be due to firewall or no proper routes to reach to destination.
如果您收到请求超时,则意味着可能是由于防火墙或没有正确的路由到达目的地。 If its connection abort it means its intermediate device is not passing connection through.
如果它的连接中止,则意味着它的中间设备没有通过连接。
Troubleshoot connectivity issues using Azure Network Watcher: https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-connectivity-portal使用 Azure 网络观察程序解决连接问题: https : //docs.microsoft.com/en-us/azure/network-watcher/network-watcher-connectivity-portal
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.