none
How do I publish web application to azure using "Publish -> "Web Deploy"? (getting error: Web Deployment task failed) RRS feed

  • Question

  • Hello, I'm getting this error when trying to deploy to azure using "Publish" from my MVC project. I checked Web Management Service and Web Deployment Agent Service and there are both running. Credentials I'm using are valid since I get access to server instance through remote desktop

    I've also checked values for the properties VS filled for me on the "Publish Web" dialog and they seem correct:

    Service Url: https://***.cloudapp.net:8172/MsDeploy.axd (where *** is my hosted service ID)

    Site/Application: NLSubscriber.Web_IN_0_Web

    What am I missing? Thanks

    Error 66 Web deployment task failed.(Could not connect to the destination computer ("***.cloudapp.net"). On the destination computer, make sure that Web Deploy is installed and that the required process ("The Web Management Service") is started.)
    This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server.
    Error details:
    Could not connect to the destination computer ("***.cloudapp.net"). On the destination computer, make sure that Web Deploy is installed and that the required process ("The Web Management Service") is started.
    Unable to connect to the remote server
    A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond xxx.xxx.xxx.xxx:8172 0 0 NLSubscriber.Web

    Friday, May 4, 2012 3:47 PM

Answers

  • Hi,

    I guess there's something wrong with your Web deploy management service, please try to modify the Service URL of "Publish" dialog box to "http://<Your Azure Namespace>.cloudapp.net/MSDEPLOYAGENTSERVICE" and have a try.

    Hope this helps.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework



    Wednesday, May 9, 2012 9:03 AM
    Moderator

All replies

  • Hi,

    The server returns 550 error means the web deploy url can be reached. I'd suggest you double check the Site/application name as I can reproduce the same issue by inputing an invalid value.

    When publishing the Azure service project, the Site/application value will be inputted automatically. We don't need to manually input the value. For instance (WebApplication2 is the web role name, Web is the site name):

    WebApplication2_IN_0_Web

    Hope this helps.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

    Saturday, May 5, 2012 5:53 AM
    Moderator
  • Hi Arwind, I doubled checked by entering IIS manager console (through RDP) and checking the site name which is the same: NLSubscriber.Web_IN_0_Web

    Also notice, that I didn't have to manually change anything, leaving both settings (Service Url and Site/Application) as pre inputted by VS in the Publish dialog.

    Anyway, as suggested in the help of the same dialog when publishing remotely through Windows Management Service, I've also tried entering the domain associated with the site, but with no luck (still getting the same error)




    • Edited by cristiang Saturday, May 5, 2012 4:19 PM
    Saturday, May 5, 2012 3:52 PM
  • Hi,

    Please have a try on:

    NLSubscriber.Web_IN_0_Web (NLSubscriber.Webis the role name. Web is the site name. Both of them can be found in ServiceDefinition.csdef file)

    Also you may want to open a remote desktop to a service instance and open up IIS manager to check the actual site name in IIS.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

    Monday, May 7, 2012 2:15 AM
    Moderator
  • Hi again,

    I tried changing the site name to Web, as suggested. Nothing changed, same error.

    Anyway, I opened Remote Desktop (again) and checked site name from IIS manager (again). This is the site name (same as pre-inputted by VS): NLSubscriber.Web_IN_0_Web

    Any other ideas? what else could I check?

    Monday, May 7, 2012 3:47 PM
  • Hi,

    Could you make sure you port 8172 is correct? And please also check firewall setting for this port.

    I think this issue may caused by port (default port is 80 in Azure).

    Hope this helps.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

    Tuesday, May 8, 2012 5:40 AM
    Moderator
  • Hi Arwind, what do you mean by port 80 is default in Azure? port 8172 is default for Management Service and I just checked is reachable (and not blocked by the firewall), by directly accessing it through my browser typing just the same address VS is showing, i.e. https://{my-app-id}.cloudapp.net:8172/MsDeploy.axd. It first presented me with this screen:

    The site's security certificate is not trusted!
    You attempted to reach {my-domain}, but the server presented a certificate issued by an entity that is not trusted by your computer's operating system. This may mean that the server has generated its own security credentials, which Google Chrome cannot rely on for identity information, or an attacker may be trying to intercept your communications.
    You should not proceed, especially if you have never seen this warning before for this site.

    And then, when clicking "Proceed anyway", it prompted me for user/password, which I provided and access it with no problem at all.


    • Edited by cristiang Tuesday, May 8, 2012 12:28 PM
    Tuesday, May 8, 2012 8:08 AM
  • Hi,

    I think the https://{my-app-id}.cloudapp.net:8172/MsDeploy.axd url could not be reached in Browser, do you ever enable any proxy in your local machine? And as far as i know, the web deploy will enable 2 service in Azure VM machine, you can use RDP to connect Azure VM and check if Web Deployment Agent Service and Web Management Service has been started.

    If it still not works, try to use Web Deploy Command Line tool to execute web deploy (You need start debugging the web site in local and related IIS site will be created in local), and try to get more details about web deployment message and error information.

    http://technet.microsoft.com/en-us/library/dd569106(v=ws.10).aspx

    Hope this helps.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

    Wednesday, May 9, 2012 3:44 AM
    Moderator
  • Hi,

    I guess there's something wrong with your Web deploy management service, please try to modify the Service URL of "Publish" dialog box to "http://<Your Azure Namespace>.cloudapp.net/MSDEPLOYAGENTSERVICE" and have a try.

    Hope this helps.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework



    Wednesday, May 9, 2012 9:03 AM
    Moderator