无法通过MS构建将我的web应用程序部署到远程位置.这个错误每次都会出现

本文关键字:位置 错误 程位置 MS 构建 我的 部署 应用程序 web | 更新日期: 2023-09-27 18:05:55

我在一个大型企业环境中工作。当我尝试使用ms构建部署我的解决方案到远程服务器时,每次我尝试部署应用程序时都会出现此错误。

根据错误信息,它说它不能连接,但我可以ping到ip。我甚至在两台机器的主机文件中添加了主机ip和名称。我不知道我是否做错了什么,有人以前遇到过这个吗?你是怎么克服的?

注意:我已经用myip.com代替了我的ip…在这个问题中,网站名称就是我的网站名称。(我的应用程序是Asp.net MVC 4应用程序)

C:'Program Files (x86)'MSBuild'Microsoft'VisualStudio'v10.0'Web'Microsoft.Web.Publishing.targets (3847): Web deployment task failed.(Could not complete the request to remote agent URL 'https://myip.com/msdeploy.axd?site=my site name'.) This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server. Error details: Could not complete the request to remote agent URL 'https://myip.com/msdeploy.axd?site=my site name'. Unable to connect to the remote server A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond myip.com

任何帮助都将非常感谢

无法通过MS构建将我的web应用程序部署到远程位置.这个错误每次都会出现

真正的错误信息隐藏在报告中,但它是:

"无法连接到远程服务器连接尝试失败,因为被连接方在一段时间后没有正确响应,或者已建立的连接失败,因为连接的主机未能响应myip.com"

这是一个TCP连接问题,这意味着可能有一个简单的解决方案。

它应该是直接的:它意味着您指定的服务器不能运行。如果你确定你的网站目前正在工作(例如,你可以从你的网络浏览器访问它),那么这意味着你输入了错误的服务器名称或其他连接细节。这并不意味着msdeploy.axd有问题,因为如果有问题,您的客户端至少可以连接。

检查您的服务器的防火墙规则,并确保web服务器(IIS)正在运行,并正在积极监听您想要的IP地址(检查站点绑定和服务器的网络配置,ipconfig /all的转储也将是有用的)。

这是IIS的问题,不允许远程连接。

在我的情况下,这是由于主机的防火墙设置。关闭本地网络防火墙修复问题