我正在尝试使用msbuild
进行Web部署到ec2实例C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
/p:Configuration=Release;MsDeployServiceUrl=ec2-instance
name.compute.amazonaws.com:8172/msdeploy.axd;MSDeployPublishMethod=RemoteAgent;username= “管理用户”;密码= “密码”; DeployIisAppPath =网站名; CreatePackageOnPublish = TRUE; DeployOnBuild = TRUE; DeployTarget = WebPublish “my.Web.csproj”
我得到了
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web
.Publishing.targets(3847,5): error : Web deployment task failed.(Could not comp
lete the request to remote agent URL ':8172/msdeploy.axd/MSDEPLOYAGENTSERVICE'.) This error indicates that you cannot connect
to the server. Make sure the service URL is correct, firewall and network sett
ings on this computer and on the server computer are configured properly, and t
he appropriate services have been started on the server.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.P
ublishing.targets(3847,5): error : Error details:\r
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.P
ublishing.targets(3847,5): error : Could not complete the request to remote age
nt URL ':8172/msdeploy.a
xd/MSDEPLOYAGENTSERVICE'.
我有
1.打开安全组中的端口8172
2.在目标
中重新安装了Web部署33.Made管理员用户并使用
非常感谢帮助。
答案 0 :(得分:1)
其使用的网址不正确。由于您是通过网络发布的,因此您使用的是网络管理服务,因此网址应采用以下格式之一:
以管理员身份发布:
https://myserver.com:8172/msdeploy.axd
如果您要作为服务器上某个网站的所有者发布并且只对您自己的网站拥有权限,那么:
https://myserver.com:8172/msdeploy.axd?site=<sitename>