1

I'm trying to get to grips with Google Cloud for a University Project.

I have created a .NET Google Cloud project on VS 2019 and I'm trying to deploy it to my Windows 2016 server on Google Cloud Platform.

However I keep getting the error: D:\Program Files\Microsoft Visual Studio\MSBuild\Microsoft\VisualStudio\v16.0\Web\Microsoft.Web.Publishing.targets(4284,5): msdeploy error ERROR_DESTINATION_NOT_REACHABLE: Web deployment task failed. (Could not connect to the remote computer ("35.235.58.62"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started.

What I've tried so far:

  • Checking server's firewall is open for inbound 8172
  • Disabled home PC firewall to make sure that wasn't the issue
  • Installed Web Platform Installer on the server
  • Added ISS Management Service through Web Platform Installer
  • Enabled remote connections on ISS

Any advice or help on the solution would be greatly appreciated.

BenHayward
  • 71
  • 1
  • 9

3 Answers3

2

Have you installed web deploy on your remote server?

Remote deployment also rely on Web deploy Agent service or Web management Service . Please ensure they have been started. Then you could check whether port number has been opened by making test with Tcping.exe from remote server.

The link provide the steps about how to publish with Management service from remote server:

Web Deploy from Visual Studio 2012 to a remote IIS 8 server

Just remember to set firewall rule like this: enter image description here Please ensure port 8172 has been enabled in both windows firewall and Google cloud external firewall.

If the management service is not working, you could try remote agent

https://learn.microsoft.com/en-us/aspnet/web-forms/overview/deployment/configuring-server-environments-for-web-deployment/configuring-a-web-server-for-web-deploy-publishing-remote-agent

Jokies Ding
  • 3,374
  • 1
  • 5
  • 10
1

The second part from Jokies Ding got it to work for me. (I'm unable to leave a comment on his post due to my stackoverflow reputation points not being 50 yet) I feel like I correctly followed google's instructions for getting web deploy to work with visual studio, but I was unsuccessful.

This below worked for me.

If the management service is not working, you could try remote agent

https://learn.microsoft.com/en-us/aspnet/web-forms/overview/deployment/configuring-server-environments-for-web-deployment/configuring-a-web-server-for-web-deploy-publishing-remote-agent

Following the online steps from google instructions to setup web deploy it should be something like this:

  1. install web deploy
  2. add user to IIS Manager Permissions
  3. [skip] check google's firewall rules (VPC network>firewall rules) port 8172 (this won't be necessary since this remote agent route uses port 80)
  4. start using https://learn.microsoft.com/en-us/aspnet/web-forms/overview/deployment/configuring-server-environments-for-web-deployment/configuring-a-web-server-for-web-deploy-publishing-remote-agent
  5. (this is from step 5 instructions) add server name as host name in Site Bindings
  6. (this is from step 5 instructions) ensure "Web Deployment Agent Service" service is running
  7. configure visual studio publish profile using attached screenshot example (I was unable to get "Visual Studio > Build > Publish [Project Name] to Google Cloud..." to work.)

enter image description here

L.Le
  • 65
  • 8
0

When you install Web Deploy, make sure to select Custom Setup and check all components. This is what solved the issue for me. IIS Deployment Handler wasn't selected

enter image description here

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

Ned
  • 1,055
  • 9
  • 34
  • 58