尝试部署到Google Cloud Platform时出现“ ERROR_DESTINATION_NOT_REACHABLE:”错误

时间:2019-10-10 12:12:46

标签: c# asp.net iis deployment google-cloud-platform

我正努力与Google Cloud进行大学项目的学习。

我已经在VS 2019上创建了一个.NET Google Cloud项目,并且正在尝试将其部署到Google Cloud Platform上的Windows 2016服务器中。

但是我仍然收到错误消息: 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.

到目前为止,我已经尝试过:

  • 检查服务器的防火墙是否针对入站8172打开
  • 禁用家用PC防火墙以确保这不是问题
  • 在服务器上安装了Web Platform Installer
  • 通过Web平台安装程序添加了ISS管理服务
  • 在ISS上启用了远程连接

对于解决方案的任何建议或帮助,将不胜感激。

3 个答案:

答案 0 :(得分:1)

您是否已在远程服务器上安装了Web部署?

远程部署还依赖于Web部署代理服务或Web管理服务。请确保它们已经启动。然后,可以通过从远程服务器使用Tcping.exe进行测试来检查端口号是否已打开。

该链接提供了有关如何从远程服务器发布管理服务的步骤:

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

请记住要像这样设置防火墙规则: enter image description here 请确保在Windows防火墙和Google Cloud外部防火墙中都启用了端口8172。

如果管理服务不起作用,则可以尝试远程代理

https://docs.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

答案 1 :(得分:1)

Jokies Ding的第二部分为我工作。 (由于我的stackoverflow信誉点还不到50,我无法在他的帖子上发表评论。)我觉得我正确地遵循了Google的说明进行网络部署以与Visual Studio配合使用,但未成功。

以下内容对我有用。

如果管理服务不起作用,则可以尝试远程代理

https://docs.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

按照Google指示的在线步骤进行设置以进行网络部署,应该是这样的:

  1. 安装Web部署
  2. 将用户添加到IIS管理器权限
  3. [跳过]检查google的防火墙规则(VPC网络>防火墙规则)端口8172(由于此远程代理路由使用端口80,因此这不是必需的)
  4. 开始使用https://docs.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. (这是来自第5步的说明)在“站点绑定”中添加服务器名称作为主机名
  6. (这是来自第5步的说明),确保“ Web Deployment Agent Service”服务正在运行
  7. 使用附带的屏幕截图示例配置Visual Studio发布配置文件(我无法使“ Visual Studio>构建>将[项目名称]发布到Google Cloud ...”正常工作。)

enter image description here

答案 2 :(得分:0)

在安装Web Deploy时,请确保选择“自定义安装”并检查所有组件。这就是为我解决问题的原因。未选择IIS部署处理程序

enter image description here

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