3

I'm attempting to use Web Deploy 3.5 in a test environment. It fails with a 404, even though Web Deploy 3.5 is installed on the test server and the Web Management Service is started.

I have even tried it locally (on the test server) on the command-line with:


"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 

The error returned on the command-line Verbose: Pre-authenticating to remote agent URL 'https://servername.com:8172/msdeploy.axd?site=mySiteName'as 'americas\r.compton'. Error Code: ERROR_DESTINATION_NOT_REACHABLE More Information: Could not connect to the remote computer ("servername.com"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management 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.


The IIS LOGS:

#Software: Microsoft Internet Information Services 7.5
#Version: 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.160.65 POST /msdeploy.axd site=mySiteName 8172 - 145.30.91.141 - 404 7 0 145
#Software: Microsoft Internet Information Services 7.5 #Version: 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

My thought is that the httpHandler, msdeploy.axd is not installed or configured correctly. Should I expect to see it among the httpHandlers in C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config?

Blanthor
  • 189
  • 1
  • 4
  • 12

2 Answers2

1

I have not used the msDeploy handler before (we use the agent extensively), but you could try enabling Failed Request Tracing in IIS to determine what the problem is. It's easy to turn on and gives you a lot more info about the request and why it returned a 404 than what the IIS logs will tell you.

Your suspicion about the handler not being installed/configured correctly seems correct and the failed request tracing would show you more about what went wrong with the handler.

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

Jeremy
  • 121
  • 1
  • This is a useful link. I wasn't able to resolve my issue as I have rolled off the project, since this posting. I found that either writing your own powershell scripts or using Octopus Deploy are better solutions. – Blanthor Apr 09 '15 at 13:58
1

The answer is sadly that Web deploy doesn't work well when you have a solution with one ASP.NET MVC application and two ASP.NET Web services. The only way I could resolve this issue was to change my Build Process Template to invoke remote PowerShell scripts to deploy for me.

I should add that one "cheat" I considered, but didn't implement, was to install a TFS Build service on the Dev app server, and tag it only for deployments. I thought this solution was a bit inelegant.

Blanthor
  • 189
  • 1
  • 4
  • 12
  • I actually solved the issue by uninstalling WebDeploy from Web Platform Installer and installing it manually from .msi instead. During the installation process it asks what features you want to install and Remote Management is off by default but needs to be on. – Joshua Walsh Apr 09 '15 at 23:33