none
Web Deploy through Webmatrix 2 "Unable to establish connection" Error

    Question

  • Hi

    I am unable to publish my web application through Webmatrix 2. Can anyone throw some light.

    The scenario is as under:

    a) Created a VM through Azure portal

    b) Created endpoints for Web deploy on port 8172 and tcp port 80

    c) RDP to Win Server 08 R2 Sp1 Jun 12 and installed Web Platform 4.0

    d) Installed IIS 7 Recommended Configuration

    e) Installed Webmatrix 2 on Server which in turn installed Dot Net 4.0, Web Deploy

    f) Installed IIS Role Services - Management Services and changed property to [Auto Start] and restarted

    g) Edited [Permissions] for the Default Website Folder and added [Network Service] and set [Read/Write/Manage] permissions.

    h) Verified that Web deploy and Web Management Service are running in Services.

    i) Checked the website from browser and can see the IIS start up page

    j) After these steps when I put in all parameters in Webmatrix Publish Settings (my ac/ is Admin on Server) I get "Unable to establish connection" error.

    Please the attached screenshot in Publish Settings in Webmatrix

    Sunday, July 08, 2012 5:41 PM

Answers

  • Hi Allen

    Success!!

    I uninstalled Web Deploy on the Azure-VM.

    Then I started Web Platform Installer 4.0 and installed Web Deploy 3.0 RC and Recommended Server Configuration for Web Hosting Providers.

    Thereafter I tried connecting from Webmatrix Web Deploy and voila - it connected successfully!

    Thanks for all the help.

    Esh

    • Marked as answer by Eshx Tuesday, July 17, 2012 6:03 PM
    Tuesday, July 17, 2012 6:03 PM

All replies

  • Hi,

    Would like like to share more info about the error? It seems that you install Webmetrix 2 in Azure VM, and you can try to package the web site and upload to via Azure Management Portal to see if works.

    BR,

    Arwind


    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, July 09, 2012 8:42 AM
    Moderator
  • Hi Arwind

    Thanks for the mail.

    Yes, I agree making a package and deploying is a workaround (in fact I did that yesterday and the website is up). But it is not possible to update the live web application as I want to upload only the modified cshtml files to the Server on a daily basis.

    Web Deploy (through Webmatrix) is not giving any error message except "unable to establish connection" so I am not able to proceed further. I don't know if there is any way to get more details of the error.

    What is interesting is, on Amazon EC2 I could deploy the same application through Web Deploy from Webmatrix on the first try. I could get an AMI (Amazon Machine Image) entitled "Win 08 R2 with Webmatrix Server" released by Microsoft - but I don't know how that Server was configured. That worked out of the box. It would be wonderful if Microsoft could provide such a machine image for Webmatrix developers on the Azure platform.

    Thanks again.

    Esh

    Monday, July 09, 2012 4:59 PM
  • Hi,

    What's the settings in the ServiceDefinition.csdef? Have you exposed tcp port 8172 and http port 80? Could you try not setting port number in "server" textbox and try again? From below article it should work.

    http://blog.tylerdoerksen.com/2011/12/05/deploy-webmatrix-sites-to-azure/


    Allen Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, July 10, 2012 2:00 AM
    Moderator
  • Hi

    Thanks for the mail.

    I'm afraid since I am not using cloud service to deploy my web app, I don't have any csdef file etc.

    Further, I guess Windows Azure Accelerator for Web Roles is deprecated after introduction of Azure Websites since early June 12.

    Best,

    Esh

    Tuesday, July 10, 2012 5:35 PM
  • Hi,

    Please see the last screenshot in the article I posted. The point is, do you expose tcp port 8172 and http port 80? Then when you publish, use the domain name only? The problem is about WebMetrix connection to the cloud VM and most likely the underlying problem is port not exposed/wrong port used when you publish in WebMetrix.

    To further troubleshooting you can use Network Monitor:

    http://www.microsoft.com/en-us/download/details.aspx?id=4865

    Please run Network monitor on the machine where you publish the site and try to connect again. After seeing the same error stop the Network monitor and you are able to get some clues from the network trace. Please let me know what you find from the trace. (what connections the publish established, what failed, etc.)


    Allen Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.





    Wednesday, July 11, 2012 1:32 AM
    Moderator
  • Hi Allen

    Thanks for the link. I captured the network monitor log. I could not find anything as regards what is failing. Is there a way to send the captured file to you so that you can have a look at it.

    I am appending the screen shot of the Endpoints of my VM showing both the ports 8172 and 80 are configured. I am able to browse my website on erpone.cloudapp.net/erponeazure - which I deployed using IIS package (zip file).

    Please revert and thanks again.

    Wednesday, July 11, 2012 6:26 PM
  • Hi,

    You can compare 2 capture files (one for "validate connection" success scenario when you connect to a web server in intranet, another is the failing scenario capture after you "validate connection" to cloud VM) and see what's the difference. If you cannot figure out you can send them to me: allenc at microsoft.com


    Allen Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.





    Thursday, July 12, 2012 1:12 AM
    Moderator

  • Hi Allen

    I am sending you 2 .cap files (through email). I could not make head or tail out of it!!

    I installed Network Monitor from the link you provided. I started the capture and then clicked [Validate Connection] in Webmatrix. As soon as I got the success/failure message, I stopped the capture and saved the log to the file.

    One of them is where Webmatrix Webdeploy succeeds. This is on Amazon Ec2 VM. The Amazon Machine Image with which I created that VM was released by Microsoft - it was Win 08 R2 Webmatrix Server.

    The other one is Webmatrix Webdeploy on Azure VM. Here Webmatrix says "Unable to establish connection."

    FYI the Webmatrix application is the same one which I am deploying on both the VMs.

    Thanks in advance.

    Best,

    Esh

    Friday, July 13, 2012 5:39 PM
  • Thanks for the captures. I'm investigating this issue.

    Allen Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Eshx Tuesday, July 17, 2012 5:58 PM
    • Unmarked as answer by Eshx Tuesday, July 17, 2012 5:58 PM
    • Marked as answer by Eshx Tuesday, July 17, 2012 6:03 PM
    • Unmarked as answer by Eshx Tuesday, July 17, 2012 6:03 PM
    Tuesday, July 17, 2012 2:14 AM
    Moderator
  • Hi Allen

    Success!!

    I uninstalled Web Deploy on the Azure-VM.

    Then I started Web Platform Installer 4.0 and installed Web Deploy 3.0 RC and Recommended Server Configuration for Web Hosting Providers.

    Thereafter I tried connecting from Webmatrix Web Deploy and voila - it connected successfully!

    Thanks for all the help.

    Esh

    • Marked as answer by Eshx Tuesday, July 17, 2012 6:03 PM
    Tuesday, July 17, 2012 6:03 PM