.net - MSDeploy 无法远程服务器
问题描述
我有两台机器,第一台是我的开发机,第二台是远程的测试机。我在两者上都安装了 IIS 和 web 部署。当我在我的开发和测试机器上使用 msdeploy 命令进行本地部署时,我的部署是成功的。但是,当我从开发机器部署到远程测试机器时,我收到如下错误:
Error Code: ERROR_DESTINATION_NOT_REACHABLE
More Information: Could not connect to the remote computer ("some-remote- server"). On the remote computer, make sure that Web Deploy is 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: No connection could be made because the target machine actively refused it 10.111.32.57:8172
Error count: 1.
我正在运行以下 msdeploy 命令:
C:\"Program Files (x86)"\IIS\"Microsoft Web Deploy V3"\msdeploy.exe -verb:sync -source:package="test.zip" -dest:auto,ComputerName="https://some-remote-machine:8172/MsDeploy.axd" -setParam:name="IIS Web Application Name",value="Default Web Site/Admin"
解决方案
首先,确保您在两台机器上都安装了管理服务。
它正在运行并设置 Windows 和 iis 凭据。
并打开8172端口。
将 iis 管理器用户设置为坐级。
配置 Web 部署发布设置。
您将在配置中找到目标 URL:
以管理员身份运行命令提示符并运行以下命令:
C:\Program Files (x86)\IIS\Microsoft Web Deploy V3>msdeploy.exe -verb:sync -source:package="c:\abc.zip" -dest:iisApp="authapp/app1",ComputerName="https://servername:8172/msdeploy.axd",UserName='server\Administrator',Password='password',AuthType='Basic' -allowUntrusted
或者
C:\Program Files (x86)\IIS\Microsoft Web Deploy V3>msdeploy.exe -verb:sync -source:iisApp="C:\inetpub\wwwroot\sitea" -dest:iisApp="authapp/app1",ComputerName="https://server:8172/msdeploy.axd",UserName='server\Administrator',Password='password',AuthType='Basic' -allowUntrusted
推荐阅读
- python - 使用回调函数更新破折号数据表
- javascript - 我的鼠标悬停和我的功能熄灭不起作用
- python-3.x - 使用 pandas_schema 验证空列
- ios - 如何在 Swift、SpriteKit 中将矩形附加到一个圆圈并随之旋转
- r - tidyr enframe vs pivot_longer 用于命名向量
- c - fork()'ing 示例
- unity3d - Unity Oculus 凝视指针 - 在第一次控制器交互之前不会激活
- css - 平稳地放慢动画
- excel - 我正在使用以下 VBA 宏来复制 Excel 中的单元格。我怎么能修改它,以便只复制 vales 而不是格式
- graphql - 无法验证包含变量的 GraphQL 查询