locked
Problems getting msdeploy to work RRS feed

  • Question

  • User1221255619 posted

    Hello,

    I spent the past few hours trying to make this work but I failed miserably. And I don't find enough info on the net for this yet!

    I am trying to deploy a web application from VS 2010 to IIS 6.0 on my server. VS 2010 only let's you use publish on an https address.

    So I installed msdeploy on https://+:8083/msdeploy2/ however I get the message in VS that it is not reachable. (I did check the firewall)

    I tried using the main IP of my server and a few others including the one of my VPN with my server but to no avail.

    Doing the command "httpcfg query urlacl" on my server I can see that is running.

    What can I do to make this work? Can anyone provide a quick step by step to make msdeploy work with IIS 6 and vs 2010?

    What does the "+" stands for? When I tried to substitute it with a defined IP the service wouldn't start..

    please help!

    Tuesday, October 27, 2009 8:05 PM

Answers

  • User1221255619 posted

    Yes, I noticed that there was a different URL, but unfortunately this is still up to VS 2010 and the "Publish" window to decide which url.

    Apparently VS 2010 is really NOT ready for being used in conjunction with your tool.

    Here a list of a few points that I believe being bugs in VS 2010 publish:

    1. You are forced to use https

    2. You are forced to finish the url with "msdeploy.axd"

    3. It automatically transform your URL adding the querystring of your site (used for wmsvc for IIS 7.0) so it's not possible to use it with IIS 6.0

    4. If it was meant only for iis 7 it should be stated somewhere.

    I opened a thread on VS 2010 support forum which is still unanswered: http://social.msdn.microsoft.com/Forums/en-US/webdevelopmentprerelease/thread/99077ce1-a656-4054-a33c-41920ee9516c

    It would be very appreciated if you liaise with that team to further integrate the deployment into the IDE.

    Thanks

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Sunday, November 1, 2009 11:43 AM

All replies

  • User1219924322 posted

     Please make sure msdepsvc service is started on the remote IIS 6.0 machine.

     Can you run the following command from your source machine (VS 10 machine) and see if you face the same problem?

    msdeploy.exe -verb:dump -source:webserver60,computername=https://<iis6machinename>:8083/msdeploy2/

    Tuesday, October 27, 2009 8:18 PM
  • User1221255619 posted

    thanks for replying,

    The service is running.

    this is the result when I use the ip of my vpn with the server:

    Error: Object of type 'webServer60' and path '' cannot be created.
    Error: Could not complete the request to remote agent URL 'https://<ipaddress>:
    8083/MyDeploy/'.
    Error: Unable to connect to the remote server
    Error: No connection could be made because the target machine actively refused it <ipaddress>:8083
    Error count: 1.

    If I use any of the direct ips I get the same but instead of the last error:

     Error: A connection attempt failed because the connected party did not properly
    respond after a period of time, or established connection failed because connect
    ed host has failed to respond <ipaddress>:8083
    Error count: 1.

     Any idea?

    Tuesday, October 27, 2009 9:23 PM
  • User1219924322 posted

    Is there a particular reason you are using https instead of http? Can you switch to using http for the remote service? Thanks!

    Tuesday, October 27, 2009 9:28 PM
  • User1221255619 posted

    The reason is that in VS 2010 BETA 2 seems that is compulsory https.

    This is because if I type http://<my url> in the "Publish Web" window it would look for "https://http//<my url>" I don't know if this is a bug or it is to prevent using http.

    However, in order to try something I am switching to http for the moment and I'll report back the result.

    Wednesday, October 28, 2009 5:05 AM
  • User1221255619 posted

    ok, thanks to your suggestions I have now managed to access it with HTTP msdeploy using the command you provided (I had to add username and password or it would give access denied).

    Then I switched to https and no luck... it says:

    Error: Object of type 'webServer60' and path '' cannot be created.
    Error: Could not complete the request to remote agent URL 'https://<ip address>:8083/msdeploy2/'.
    Error: The underlying connection was closed: An unexpected error occurred on a s
    end.
    Error: Authentication failed because the remote party has closed the transport s
    tream.
    Error count: 1.

    I tried this command:

    httpcfg set ssl -i 0.0.0.0:8083 -h 55F3E6062 2CE26F28C2AFE4C39F09F38F1204323 -g {00000000-0000-0000-0000-000000000000}

    On port 8083 and 443. And reinstalled service on both port but nothing.

    Any advice?

    Wednesday, October 28, 2009 5:54 AM
  • User1221255619 posted

    I manage to install a selfSsl certificate and make it connect on https. It does connect using this command:

    msdeploy.exe -verb:dump -source:webser
    ver60,computername=https://<ipaddress>:8085/msdeploy2/,userName=<user>,p
    assword=<password> -allowUntrusted

    However, when I try it from VS 2010 I get this:

    Error 13 VsMsdeploy failed.(Remote agent (URL https://<ipaddress>:8085/MsDeploy2/msdeploy.axd?site=DomegosApplication) could not be contacted.  Make sure the remote agent service is installed and started on the target computer.)
    Error detail:
    Remote agent (URL https://<ipaddress>:8085/MsDeploy2/msdeploy.axd?site=DomegosApplication) could not be contacted.  Make sure the remote agent service is installed and started on the target computer.
    An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected.
    The remote server returned an error: (401) Unauthorized.  0 0 <myapplication>

    Since in VS window I am forced to set "msdeploy.axd" at the end of the server address I reinstalled msdeploy in order to listen to: https://<ipaddress>:8085/MsDeploy2/msdeploy.axd but I receive the same error. However, it connects fine from command prompt.

    suggestions please?

    Wednesday, October 28, 2009 6:48 AM
  • User1221255619 posted

    In the end it works by using the right msdeploy command "sync" with source and dest specified with "contentPath" property. However, it doesn't work with VS 2010 "publish" function, what is the command used by VS?

    is it possible either to fix that or change the default command that is used by VS UI?

     

    Wednesday, October 28, 2009 6:29 PM
  • User1219924322 posted

    Your URL going over https://<ipaddress>:8085/MSDeploy2/msdeploy.axd?site-DemegosApplication suggests you are using wmsvc as the agent and not msdeplsvc on the remote machine. wmsvc exists only on IIS 7.0 boxes, hence you can only publish to an IIS 6.0 machine using this command.

    A brief detail of why we host the agent inside wmsvc on IIS 7.0

    MSDeploy has always been hosted using the Remote Agent Service. This agent service runs under “NETWORK SERVICE” user account and is accessible over the network by an administrator. This is not suitable for users who would like to remotely publish their application to the hoster’s server machine, since they do not have admin access to the box. Hence the need for the remote agent service to be hosted inside WMSVC as a handler.

    Thursday, October 29, 2009 1:45 PM
  • User1221255619 posted

    Yes, I noticed that there was a different URL, but unfortunately this is still up to VS 2010 and the "Publish" window to decide which url.

    Apparently VS 2010 is really NOT ready for being used in conjunction with your tool.

    Here a list of a few points that I believe being bugs in VS 2010 publish:

    1. You are forced to use https

    2. You are forced to finish the url with "msdeploy.axd"

    3. It automatically transform your URL adding the querystring of your site (used for wmsvc for IIS 7.0) so it's not possible to use it with IIS 6.0

    4. If it was meant only for iis 7 it should be stated somewhere.

    I opened a thread on VS 2010 support forum which is still unanswered: http://social.msdn.microsoft.com/Forums/en-US/webdevelopmentprerelease/thread/99077ce1-a656-4054-a33c-41920ee9516c

    It would be very appreciated if you liaise with that team to further integrate the deployment into the IDE.

    Thanks

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Sunday, November 1, 2009 11:43 AM
  • User-56689832 posted

    Hi,

    I have forwarded you comments to Visual Studio team and they are looking into it.

    Thanks for your feedback.

     

    Sunday, November 1, 2009 8:59 PM
  • User-2059275514 posted

    Thank you for forwarding the feedback. I have updated the above forms link with more information. 

    Thanks,
    Ben Byrd
    Visual Web Developer Team

    Sunday, November 1, 2009 10:35 PM
  • User1221255619 posted

    It is very much appreciated and I'm looking forward to the new version

    Thanks

    Marco

    Monday, November 2, 2009 3:25 AM
  • User-1131243847 posted

    I got same error message "v1" expected...

     Make sure you have following properties set in web application:

    1. Publish method: Web deploy

    2. Service URL: http://<ServerIPAddress>

    3. Site/Application:Default Web Site/<ApplicationName>

    4. Mark as Application

    5. Administrator account details on Server box

    6. also make sure in IE browser Lan settings : add server Ip address to bypass proxy  list

    should resolve the error...

    Monday, October 18, 2010 6:09 AM
  • User810077870 posted

     Hey

     I also got "I got same error message "v1" expected... "

    Everything was fine server side but a quick reboot of my local machine cured the issue for me!

     Paul

    Thursday, February 24, 2011 9:13 AM
  • User-2027941973 posted

    I was getting this error:

    Error    27    Web deployment task failed.(Remote agent (URL http://192.168.10.13/MSDEPLOYAGENTSERVICE) could not be contacted.  Make sure the remote agent service is installed and started on the target computer.)

    Remote agent (URL http://192.168.10.13/MSDEPLOYAGENTSERVICE) could not be contacted.  Make sure the remote agent service is installed and started on the target computer.
    An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected.
    The request was aborted: The request was canceled.
    COM object that has been separated from its underlying RCW cannot be used.

    Just wanted to report that I fixed this by restarting VS2010. Thanks!

    Friday, December 2, 2011 2:25 PM
  • User-1141509180 posted

     ludwigs3rd, you saved my night. that's exactly my problem. your solution worked. thanks

    Sunday, May 20, 2012 2:15 AM