我正在尝试使用以下msdeploy命令部署我的应用程序:
MSDeploy.exe -source:contentPath="C:\Users\myUser\Documents\ui\dist" -dest:contentPath='c:/inetpub/wwwroot/dist',computerName="https://ec2-xx-xxx-xx-xx.ap-northeast-1.compute.amazonaws.com:8172/MSDeploy.axd?site=Default Web Site",username="administrator",password="XXXXXXXXX",authtype="Basic",includeAcls="False" -verb:sync -allowUntrusted
收到以下错误:
Working...
Info: Using ID '01657062-cece-4713-8dc6-585537b265fd' for connections to the rem
ote server.
>> Error Code: ERROR_DESTINATION_NOT_REACHABLE
>> More Information: Could not connect to the remote computer ("ec2-52-207-222-6
5.compute-1.amazonaws.com"). On the remote computer, make sure that Web Deploy i
s installed and that the required process ("Web Management Service") is started.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION
_NOT_REACHABLE.
>> Error: Unable to connect to the remote server
>> Error: 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 xx.xxx.xx.xx:8172
我为其他6台服务器尝试了相同的命令,但它工作正常,但不适用于以相同方式配置的2台服务器。
我缺少什么?
答案 0 :(得分:3)
将规则添加到端口8172的安全组,它开始工作。但我不知道为什么它之前是从Visual Studio工作而不是从命令提示符。
答案 1 :(得分:3)
要使用Web部署将您的网站成功部署到Windows服务器,请确保以下内容已准备就绪。
站点名称必须在Visual Studio和IIS服务器上完全匹配
确保使用与visual studio相同的.NET框架安装服务器(例如ASP,ASP.net 4.5 ......)
确保服务器上的端口8172已打开(8172用于Web部署)
答案 2 :(得分:0)
如果您使用的是Google Cloud,我的解决方案是通过Google的网络界面打开端口8172。 Computer Engine> VM实例>网络接口> nic0> default-allow-http
答案 3 :(得分:0)