Alok Dhyani
Alok Dhyani

Reputation: 373

Web Deploy results in ERROR_COULD_NOT_CONNECT_TO_REMOTESVC

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.

How can this be fixed?

Upvotes: 37

Views: 31355

Answers (9)

Erik Anderson
Erik Anderson

Reputation: 5289

The resolution for my me was setting IIS Management Service to a new SSL certificate as explained in https://stackoverflow.com/a/64706624/130614.

IIS Manager

Upvotes: 0

Tom Hundley
Tom Hundley

Reputation: 1375

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

Upvotes: 99

Rafael Neto
Rafael Neto

Reputation: 1280

There is another possible cause of the error. IIS Managemente Service have its own configuration for IP Address Restrictions, which default value is Deny Access for unspecified clients (Windows Server 2012 R2 with IIS 8.5).

You must set this value to Allow or add access to your specific IP address/IP address range using the Allow... button.

Remember, you must Stop the Management Service previously to change this configuration.

Allow access for unspecified clients in Management Service

Upvotes: 0

Kessem Lee
Kessem Lee

Reputation: 1373

You should check the logs on your IIS first - see that you actually get to the server, and then you can locate the exact error here - https://support.microsoft.com/en-us/help/943891/the-http-status-code-in-iis-7-0-iis-7-5-and-iis-8-0

Uninstalling and re-installing (not repairing!) after setting up IIS did most of the magic for me.

Upvotes: 0

Fairoz
Fairoz

Reputation: 878

In my case the Internet proxy was enabled on source - which made msdeploy to reach out to internet instead of local ICN.

Upvotes: 0

zola25
zola25

Reputation: 1921

I got this error when using msdeploy, not TFS. In my case I needed to make sure the user msdeploy is using had permission to deploy to the website.

Find the website in IIS manager, right click and go to Deploy, then Configure Web Deploy Publishing. Find the user used by Web Deploy and setup for this website.

Upvotes: 0

Ella Moshe
Ella Moshe

Reputation: 171

Fix that i saw on another website:

Fix it by adding “http://” to server.

In other words, when server is www.xxxx.com would get the 403 error, but when server is http://www.xxxx.com, then it works.

Upvotes: 17

user3085805
user3085805

Reputation: 611

You need also to indicate the app name e.g 'Default Web Site/MyApp'

That was my error. Once I added /MyApp, it worked.

Upvotes: 4

p.campbell
p.campbell

Reputation: 100567

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.

Upvotes: 50

Related Questions