[英]Ms deploy from the command line
Ok編譯了代碼,並通過上下文菜單上的publish選項清除了詳細的構建過程中的VS的命令詳細信息,將其清理干凈,然后將命令提取到我的構建服務器中,恰好與測試相同網頁框此刻並更改了路徑。
來自Team Services的MSBuild使用args“ / p:DeployOnBuild = true; PublishProfile = Test; DeployTarget = package”運行,因此它為每個Web應用程序吐出一個包。
這與VS的方式略有不同,這意味着我必須調整源參數,因此我從命令行運行了以下命令(添加了格式以提高可讀性)...
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
...這給了我以下回應...
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”(我用來遠程訪問該服務器的域名)會導致...
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進行對話,即使我確實從本地計算機上與它進行了對話,這似乎也不令人滿意。
我這里缺少一些巫術嗎?
將您的計算機名更改為“ localhost”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.