Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Deploy results in ERROR_COULD_NOT_CONNECT_TO_REMOTESVC

Tags:

webdeploy

We are trying to configure continuous integration with TFS 2012. While queuing a new build, the publish fails with the error:

Build FAILED. "C:\src\ProjectName.sln" (default target) (1) -> "C:\src\Website\ProjectName.csproj" (default target) (2) -> (MSDeployPublish target) -> C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4377,5): msdeploy error ERROR_COULD_NOT_CONNECT_TO_REMOTESVC: Web deployment task failed. (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)**

I checked all the points mentioned in the IIS.NET documentation for this error. Both services mentioned, Web Management Service and Web Deployment Agent Service, are running fine. A restart of those services has no change in behavior.

  • Windows Server 2008 R2 with IIS 7.
  • Web Deployment Agent Service is running on port 8172.
  • Web Deploy 3.0
  • Windows Firewall is not blocking any port on the server.

How can this be fixed?

like image 594
Alok Dhyani Avatar asked Sep 11 '13 10:09

Alok Dhyani


People also ask

What does web Deploy do?

Overview. The Web Deploy is a tool for simplifying migration, management and deployment of Web applications, sites and servers. It can be used to package a Web site, automatically including content, configuration, certificates and databases. It can be used to synchronize between IIS 6.0, IIS 7.

What is web Deploy and web deployment?

Web Deploy is an extensible client-server tool for syncing content and configuration to IIS. Web Deploy is used primarily in two scenarios: Developers use it to sync (aka 'publish') a compiled web applications (ASP . Net, PHP etc) from developer tools (Visual Studio, WebMatrix, etc) to IIS.


2 Answers

If you install Web Deploy 3.x BEFORE Web Management Tools are installed, you'll have to re-install Web Deploy. I beat my head against the wall for hours on this.

  1. Install the Web Management Services ("Turn Windows Features On/Off"/Roles -> Web Server -> Management Tools -> Management Service) enter image description here
  2. Then uninstall Web Deploy (repair didn't work) via the usual Add/Remove Programs control panel enter image description here
  3. Install Web Deploy 3.x again using Web Platform Installer.

Fixed. /Sigh

like image 132
Tom Hundley Avatar answered Oct 16 '22 08:10

Tom Hundley


Double check in your Web Deploy settings that the name of the website is exactly that of what's in IIS.

enter image description here

enter image description here

Ben Day blogged more about it.

like image 32
p.campbell Avatar answered Oct 16 '22 08:10

p.campbell