Azure DevOps, Scrum, & .NET Software Leadership and Consulting Services

Introducing Slide Speaker: Videos with Voice-over from your PowerPoint and Google Slides Presentations

Fix: ASP.NET Web Deploy ‘ERROR COULD NOT CONNECT TO REMOTESVC’ error


I was playing around with deploying an ASP.NET application to a server using Web Deploy in Visual Studio 2012 and I go this annoying little error.  I’d fill out the dialog for publishing via Web Deploy and when I’d click “Validate Connection” it would run and eventually fail.  The problem turned out to be “user error” obscured by a misleading error message.  (Scroll to the bottom for the fix.)

image

When I clicked on the “Failed (click for details)” link, it would show me the following:

Could not connect to the remote computer (“servername”) using the specified process (“Web Management Service”) because the server did not respond.  Make sure that the process (“Web Management Service”) is started on the remote computer.  Learn more at http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.  The remote server returned an error: (550).

 image

That link in the error message take you here and that page walks you through verifying that you can 1) ping the remote machine, 2) verify that the msdepsvc or wmsvc services are started, and 3) that the firewall isn’t blocking ports 80 or 8172. 

I tried pinging the server from my developer machine and it worked.

image

I checked the Web Deployment Agent Service (msdevsvc) and the Web Management Service (wmsvc) and they were both running.

image

I checked the Windows Firewall and (being someone who’s not one to leave anything to anything to chance and favors the brute force approach) turned the Firewall off entirely. 

SNAGHTML3f140ac

Everything seemed to be set up properly but the error remained.  Maybe it’s user error.  Hmmm. 

The Fix.

I started looking at the values that I was typing into the dialog and that Site name one was bothering me.  Did I have that value right? 

image

The site name field relates to the name of the Internet Information Server (IIS) site instance name on the server.  I logged onto the target server and opened up the Internet Information Services (IIS) Manager console.

I expanded the nodes until I saw the list of sites and it turns out that it’s not “defaultwebsite” but instead it’s “Default Web Site”. 

image

I went back to the Web Deploy Publish Web dialog, changed the values and clicked Validate Connection.

image

This time it worked. 

Summary

The ERROR_COULD_NOT_CONNECT_TO_REMOTESVC error message could indicate that you’ve typed the IIS site name value in incorrectly.  Verify the site name on the target server in IIS Manager and try again.

-Ben

SUBSCRIBE TO THE BLOG


11 responses to “Fix: ASP.NET Web Deploy ‘ERROR COULD NOT CONNECT TO REMOTESVC’ error”

  1. Paul Avatar
    Paul

    Hey thankyou so much for publishing this. Saved me so much time. Such a simple change.

  2. Ian Day Avatar
    Ian Day

    Thanks Ben – that fixed my issue.

  3. Param Avatar
    Param

    Thanks 🙂 Worked like a charm!

  4. Marcel Avatar
    Marcel

    Thousand thanks! You saved me! The MS documentation could be much better on this.

  5. Nick Avatar
    Nick

    Thank you, I’ve been trying to figure this out all night.

  6. zipor Avatar
    zipor

    Great article, plain and simple, and most important – it helped!

    Thanks!

  7. 100000000 Avatar
    100000000

    thanks 🙂

  8. Ricky Avatar
    Ricky

    Excellent Blog post Ben, I’ve spent the last few hours trying to figure this out and your blog post explained exactly what was wrong. Great Job.

  9. Gustavo Avatar
    Gustavo

    Thanks! I’ve been struggling with this error for a couple days.

  10. Sunny Avatar
    Sunny

    Big thanks, really saved my time digging through the various sites and Googling a lot!

  11. Marc Ziss Avatar
    Marc Ziss

    I had the Web Management Service installed but didn’t have the WebDeploy installed. Thanks to your great summary; I figured out which piece I was missing.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.