0

我正在尝试使用 msbuild 将网络部署到 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="adminuser";password="password";DeployIisAppPath=Sitename;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.Reinstalled web deploy 3 in target

3.创建一个管理员用户并使用它

帮助将不胜感激。

4

1 回答 1

1

它使用的 URL 不正确。由于您通过 Web 发布,因此您使用的是 Web 管理服务,因此 url 应采用以下格式之一:

以管理员身份发布:

https://myserver.com:8172/msdeploy.axd

如果您作为服务器上某个站点的所有者发布并且仅对您自己的站点具有权限,则:

https://myserver.com:8172/msdeploy.axd?site=<sitename>
于 2013-05-14T17:06:05.323 回答