Could not reach the Web Deploy endpoint on the specified virtual machine

Vincent Roggero 11 Reputation points
2020-06-27T21:21:07.19+00:00

Dev config: Windows 10 Pro 1903; Visual Studio 2019
Azure VM: Windows Server 2019; IIS enabled

I'm trying to deploy an existing .NET Core 2.1 Web App to an Azure VM. IIS is working as I can go to the default IIS page via IP address or the Azure DNS. When I try to deploy from VS from Azure Virtual Machines profile I get 'Could not reach the Web Deploy endpoint on the specified virtual machine'. I've gone thru https://github.com/aspnet/Tooling/blob/AspNetVMs/docs/create-asp-net-vm-with-webdeploy.md to set up web deploy.

On the Azure VM,

  • I have ASP.NET 4.6 installed.
  • Web Management Service is running.
  • WebDeploy 3.6 is installed.
  • The firewall has an inbound rule for port 80 and 8172.
  • Ran netstat -ano (TCP [::]:8172 [::]:0 LISTENING 4)
  • I have a DNS name configured for the VM.

The VS publish dialog finds my Azure VM but when I click ok I get this error.

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

2 answers

Sort by: Most helpful
  1. Vincent Roggero 11 Reputation points
    2020-06-27T23:23:59.983+00:00

    Found the problem. In the Azure Portal -> VM -> Network I had the source port set to 8172 instead of *.

    2 people found this answer helpful.

  2. Javier Alvarez de Pedro 6 Reputation points
    2022-01-13T17:44:20.82+00:00

    Thanks for sharing.

    In my case, it didn´t work at first because I hadn´t started the Web Management Service. After setting to automatically start and start it, it did.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.