为什么我无法使用Web Deploy 3.5进行部署?

我试图在testing环境中使用Web Deploy 3.5。 即使在testing服务器上安装了Web Deploy 3.5并启动了Webpipe理服务,它也会以404失败。

我甚至在本地(在testing服务器上)在命令行上尝试了它:


"c:\Program Files (x86)\IIS\Microsoft Web Deploy V3"\msdeploy -verb:sync -source:contentPath="E:\Downloads\Deployments\DefaultSite_All_MSDeploy.zip" -dest:contentPath='DefaultSite/mySiteName',ComputerName="https://localhost:8172/msdeploy.axd?site=PhaseI",UserName='americas\r.compton',Password='notmypassword',AuthType='Basic' -enableRule:doNotDeleteRule -allowUntrusted -verbose 

Verbose命令行返回的错误:以远程代理程序URL“ https://servername.com:8172/msdeploy.axd?site=mySiteName ”作为“americas \ r.compton”预先validation。 错误代码:ERROR_DESTINATION_NOT_REACHABLE更多信息:无法连接到远程计算机(“servername.com”)。 在远程计算机上,确保已安装Web部署,并且已启动所需的进程(“Webpipe理服务”)。 有关详细信息,请访问: http : //go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE错误:远程服务器返回错误:(404)未find。


IIS日志:

#软件:Microsoft Internet信息服务7.5
#版本:1.0
#date:2013-12-12 18:18:41
#Fields:date time s-ip cs-method cs -uri-stem cs -uri-query s-port cs-username c-ip cs(User-Agent)sc-status sc-substatus sc-win32-status time-taken2013 -12-12 18:18:41 138.57.1​​60.65 POST /msdeploy.axd site = mySiteName 8172 – 145.30.91.141 – 404 7 0 145
#软件:Microsoft Internet Information Services 7.5#版本:1.0
#date:2013-12-12 21:08:23
#Fields:date time s-ip cs-method cs -uri-stem cs -uri-query s-port cs-username c-ip cs(User-Agent)sc-status sc-substatus sc-win32-status time-taken 2013-12-12 21:08:23 fe80 :: 7157:1fcd:691b:93f%10 HEAD /msdeploy.axd site = PhaseI 8172 – fe80 :: 7157:1fcd:691b:93f%10 – 404 7 0 0 2013 -12-12 21:09:32 fe80 :: 7157:1fcd:691b:93f%10 HEAD /msdeploy.axd site = PhaseI 8172 – fe80 :: 7157:1fcd:691b:93f%10 – 404 7 0 0

我的想法是,httpHandler,msdeploy.axd没有安装或正确configuration。 我应该期望在C:\ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Config \ web.config中的httpHandlers中看到它吗?

我之前没有使用msDeploy处理程序(我们广泛使用代理),但可以尝试在IIS中启用“失败的请求跟踪”以确定问题所在。 打开它很容易,并且提供了更多有关请求的信息,以及为什么它返回了404日志,而不是IIS日志会告诉您的信息。

您对处理程序没有正确安装/configuration的怀疑似乎是正确的,失败的请求跟踪会显示更多关于处理程序出错的信息。

http://blogs.msdn.com/b/benjaminperkins/archive/2012/01/02/enable-and-activate-failed-request-tracing-rules.aspx

答案是可悲的是,当您有一个ASP.NET MVC应用程序和两个ASP.NET Web服务的解决scheme时,Web部署无法正常工作。 我可以解决这个问题的唯一方法是更改​​我的生成过程模板来调用远程PowerShell脚本为我部署。

我应该添加一个我认为但是没有实现的“欺骗”,就是在Dev应用服务器上安装一个TFS Build服务,并且只对部署进行标记。 我觉得这个解决scheme有点不雅。