Visual Studio 2012 Web Deploy to Windows Server 2008 R2 with IIS 7 and /msdeploy.axd 404 error
Asked Answered
T

9

23

In Visual Studio 2012 RC when I try to validate a Web Deploy connection I get this error message:

ERROR_DESTINATION_NOT_REACHABLE

enter image description here

The required Web Management Service is started on the server and Web Deploy 3.0 RC is installed.

Then using Remote Desktop Connection I log on the server and go check IIS logs located at C:\inetpub\logs\LogFiles\W3SVC1. There I can see my attempts to validate the connection because they contain my IP address:

2012-07-13 20:58:49 185.201.117.17 HEAD /msdeploy.axd site=Default%20Web%20Site 8172 - 189.10.32.194 - 404 0 2 78

It's giving me a 404.

After trying to get this working for almost 6 hours now (reading a lot of material including this great Troubleshooting guide by IIS team titled Troubleshooting Web Deploy problems with Visual Studio and this related question Visual Studio 2010 Web deployment task failed) I decided to ask for help here and see if anyone has a clue about what can be the problem... Do you know what's causing this 404 error?

If you need any more info, just ask me and I'll provide it... :)

Edit 1

Yesterday I also tried the following msdeploy command on my local machine to list the the contents of a folder called test on the server [ and it worked as expected ]:

C:\Program Files\IIS\Microsoft Web Deploy V3>msdeploy -verb:dump -source:content
path=c:\test,computerName=xxxxxxxxxx.publiccloud.com.br,username=User,password=Password
Info: Using ID 'a246a13c-7777-4226-964c-fe9934c60b77' for connections to the rem
ote server.
MSDeploy.contentPath
c:\test
c:\test
c:\test\test.txt

Edit 2

After a lot of install/reinstall operations I finally got to a point where Windows Server 2008 is returning a 503 HTTP error when I try to publish the web site using VS 2012 RC or even msdeploy in the command line.

Looks like the best thing to do now is to do a clean install of Windows Server 2008 since I got a messed up VM server image to work with. Hope it'll do the trick.

Just for the record, this is the msdeploy command VS 2012 tries to execute. I did a copy/paste and tried it with msdeploy in the command line:

C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe -source:manifest='E:\SISPEC\SISPEC\obj\Release\Package\SISPEC.SourceManifest.xml' -dest:auto,ComputerName="https://xxxxxxxxxx.publiccloud.com.br:8172/msdeploy.axd?site=Default%20Web%20Site",UserName='UserName',Password='Password',IncludeAcls='False',AuthType='Basic' -verb:sync -enableRule:DoNotDeleteRule -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"E:\SISPEC\SISPEC\obj\Release\Package\SISPEC.Publish.Parameters.xml" -retryAttempts=2

just to get the same 503 Server Unavailable message.

Edit 3

This question was cross-posted at the IIS Web Deployment Tool (MS Deploy) forum here.

Tabu answered 14/7, 2012 at 0:24 Comment(0)
M
26

Fyi - I too was getting the 404 errors. It turned out that I had to download the full package and install everything.

http://www.iis.net/downloads/microsoft/web-deploy#additionalDownloads

Margueritamarguerite answered 12/9, 2012 at 1:13 Comment(3)
This fixed it for me. If you install from the WEBPI it doesn't install the entire functionality.Pily
I knew I should have checked that box in the initial install that said 'All Features', instead of 'Typical'Preciousprecipice
WHYYYYY????? ... Thanks so very much lol. What good are the UI components without the actual deployment capabilities?Fabliau
A
3

I had this same error (ERROR_DESTINATION_NOT_REACHABLE). I was able to fix the issue by opening port 8172.

I then ran into the error: ERR_COULD_NOT_CONNECT_TO_REMOVESVC which I was able to resolve by installing every component of Web Deploy 3.0. It was trying to hit /MSDEPLOYAGENTSERVICE which by default isn't installed by the Web Deploy 3.0 installer.

Augustinaaugustine answered 11/8, 2012 at 19:27 Comment(0)
K
3

I had to manually add the Deployment Handler. In IIS Manager, with the server selected, choose "IIS|Handler Mappings|Add Managed Handler...".

Request path: msdeploy.axd
Type: Microsoft.Web.Deployment.DeploymentAgentHandler,..., Version=9...
Name: Web Deploy Whatever
Kristofor answered 10/12, 2012 at 13:15 Comment(2)
This worked for me (I wasn't seeing msdeploy.axd in handlers and it gave me 404). On an other server (Windows Server 2012R2 x64) I also had to install .NET Framework 3.5 before the handler was visible in the Add Managed Handler dialog. What a load of crap from MS.Ulotrichous
For some reason i had no handler mapping either, but adding manually didn't seem to helpLykins
A
2

In my case, the default certificate issued for WMSVC was not issued for the machine-name. My Solution was to:

  1. Issue a certificate for the machine name from my domain CA. This could be self-signed if you're willing to trust the certificate.
  2. Install that certificate under the Personal certificate store
  3. stop the web management service
  4. change the certificate to my properly issued certificate
  5. restart the service.
Associationism answered 9/6, 2014 at 20:9 Comment(1)
this was the issue I encountered when web deploying to a sysprep'd azure vm image. Stopping the service, create a new self signed certificate and assigning it (management service icon in IIS Manager at server level) fixed the issue...Miran
C
1

Did you check your handlers? You can test this by creating an HTML page on the same folder and trying to access that HTML. If you can, then go check that your site has the necessary handlers. Also, make sure your DNS record are pointing to the correct IP address.

Centavo answered 14/7, 2012 at 0:44 Comment(2)
I created a test.html page and placed it in C:\inetpub\wwwroot folder on the server. Then I accessed it from my local machine using: xxxxxxxxxx.publiccloud.com.br/test.html and the test succeeded. I could read the page. I don't understand when you say "Check that your site has the necessary handlers". I think DNS configuration is not the problem.Tabu
For IIS 7.0 running in Integrated mode, you register the handler by using the handlers element in the system.WebServer section. See below sample.<configuration> configuration> <system.web> <httpHandlers> <add verb="" path="SampleHandler.new" type="SampleHandler, SampleHandlerAssembly" /> </httpHandlers> </system.web> <system.webServer> <add name=SampleHandler" verb="" path="SampleHandler.new" Modules="IsapiModule" scriptProcessor="FrameworkPath\aspnet_isapi.dll" resourceType="File" /> </system.webServer> </configuration>Centavo
K
1

In my case I had both Web Deploy 2.0 and 3.0 on server machine. Removing both and installing just 3.0 solved my issue.

Koah answered 14/11, 2012 at 16:49 Comment(0)
D
1

First I tried just Repair install of Web Deploy 3.0 and not worked. Removing and installing solved my issue.

Deon answered 19/1, 2013 at 22:27 Comment(0)
P
0

Ensure Web Management Service is started.

I deleted SSL certificate and the service stopped working.

Pustulant answered 26/4, 2014 at 3:19 Comment(0)
C
0

If all previous indications fail, and if you are using an Azure virtual machine, where the endpoint for 8172 is open, I have solved it deleting the endpoint and opening it again. I believe the first time I have selected using Floating IP Enabled, and that did not work. Just create the endpoint again, select disable floating ip and done!

Creativity answered 15/9, 2014 at 12:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.