女士从命令行部署 [英] Ms deploy from the command line

查看:109
本文介绍了女士从命令行部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好了,构建了代码,并通过上下文菜单中的publish选项在详细构建期间从VS中提取了命令详细信息,将其清理干净,然后提取了命令,然后将命令带到了我的构建服务器上,恰好是同一盒作为我目前的测试网络框,并更改了路径.

Ok built the code and pulled the command details from VS during a verbose build via the publish option on the context menu having cleaned it up, extracted the command I took the command to my build server which just happens to be the same box as my test web box at the moment and changed the paths.

Team Services的MSBuild使用args"/p:DeployOnBuild = true; PublishProfile = Test; DeployTarget = package"运行,因此它为每个Web应用程序吐出一个软件包.

MSBuild from Team services is running with the args "/p:DeployOnBuild=true;PublishProfile=Test;DeployTarget=package" so it spits out a package for each web app.

这与VS的方式略有不同,这意味着我必须调整源参数,因此我从命令行运行了以下命令(添加了格式以提高可读性)...

This being slightly different to how VS does it meant I had to tweak the source param so I ran the following from the command line (formatting added to help readability)...

C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe 
  -source:package='..\API.zip' 
  -dest:auto,ComputerName='https://localhost/MSDEPLOYAGENTSERVICE',UserName='MSDeployUser',Password='********',AuthType='NTLM',IncludeAcls='False' 
  -setParam:name='IIS Web Application Name',value='Api\MyApp'
  -verb:sync 
  -retryAttempts=2 
  -disableLink:AppPoolExtension 
  -disableLink:ContentExtension 
  -disableLink:CertificateExtension

...得到了以下答复...

... that got me the following response ...

Info: Using ID '6f5795f6-79bf-49cd-ac27-cc320e3af063' for connections to the rem
ote server.
Error: Could not complete the request to remote agent URL 'https://localhost/MSD
EPLOYAGENTSERVICE'.
Error: The underlying connection was closed: An unexpected error occurred on a s
end.
Error: Unable to read data from the transport connection: An existing connection
 was forcibly closed by the remote host.
Error: An existing connection was forcibly closed by the remote host
Error count: 1.

...将"localhost"替换为指向服务器的域名(我用来远程访问该服务器的域名)会导致...

... replacing "localhost" with the domain name pointing at the server (the one I use to remote in to the box with) results in ...

Info: Using ID 'b4820db6-a975-4a77-96f1-51390bcced37' for connections to the rem
ote server.
Error Code: ERROR_DESTINATION_NOT_REACHABLE
More Information: Could not connect to the remote computer ("<my domain>"). On the remote computer, make sure that Web Deploy is installed and that t
he required process ("Web Deployment Agent Service") is started.  Learn more at:
 http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Error: The remote server returned an error: (404) Not Found.
Error count: 1.

...奇怪,因为我可以远程访问该域上的计算机,但是由于某种原因我无法与它进行MSDeploy对话,即使我确实从本地计算机上与之进行对话,似乎也不是.快乐.

... odd since I can remote in to the machine on the domain but I can't talk to MSDeploy on it for some reason, and even when I do talk to it explicitly from the local machine it seems to not be happy.

我这里缺少一些巫术吗?

Is there some wizardry I am missing here?

推荐答案

部署具有MSDEPLOY的Web软件包

按照这里的答案...是的,这太愚蠢了,甚至都不好笑.

As per the answer here ... yup this is so stupid it's not even funny.

除使用/L参数查找iis Express实例外,MSDeploy似乎无法部署到本地计算机.

MSDeploy can't seemingly deploy to the local machine other than with the /L argument which looks for an iis express instance.

这篇关于女士从命令行部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆