2016-08-15 38 views
0

確定了代碼,並在詳細構建過程中通過上下文菜單上的發佈選項從VS中提取了命令細節,並清理了它,提取了命令,然後將命令發送到我的構建服務器,恰好與我目前的測試網絡框相同,並更改路徑。從命令行部署女士

來自團隊服務的MSBuild使用參數「/ p:DeployOnBuild = true; PublishProfile = Test; DeployTarget = package」運行,因此它爲每個Web應用程序分配一個包。

這是到VS如何做這意味着我不得不調整源PARAM所以我跑在命令行(格式化加入到幫助可讀性)以下的略有不同...

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交談,甚至當我明確從本地機器談到它時,似乎也不要開心。

這裏有一些巫術嗎?

回答

2

Deploying web packages with MSDEPLOY

按照這裏的答案......這是啊是愚蠢它甚至沒有滑稽。

除了使用查找iis快速實例的/ L參數外,MSDeploy不能看似部署到本地計算機。

-1

將計算機名更改爲「localhost」。