Web Deploy results in ERROR_COULD_NOT_CONNECT_TO_REMOTESVC
Asked Answered
L

9

37

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?

Latterday answered 11/9, 2013 at 10:59 Comment(9)
Are you trying Continues Integration first time? if yes, try to create a publish profile on your web project and try to web deploy manually.Chubb
Thanks for replying. I tried publishing locally on the server by creating a publish profile and tried web deploying manually, but it is still giving the same error. Also while hitting the URL - ServerName:8172/msdeploy.axd, I am getting the HTTP 404 file not found error. Please Help..Latterday
I Have also Tried Re-installing the wmsvc serviceLatterday
Looks like, you didn't install web Deploy properly. did you follow all these steps in this link iis.net/learn/install/installing-publishing-technologies/… ? Try Reinstall that.Chubb
No It didnt worked after following those steps mentioned in the link too. I am afraid what could be the problem.Latterday
Try localhost:8172/msdeploy.axd in your Webserver. Make sure its working. if it is working, check firewall port is open for 8172 in firewall settings (Web Management Service (HTTP Traffic-In)).Chubb
On Hitting localhost:8172/msdeploy.axd it asks to proceed for untrusted connection, and on clicking it, it gives pop up for user name/pwd to connect to Web Management Service. I gave the credentials which has administrator rights, but on proceeding it shows 404 page.Latterday
The user no need to be an administrator. The user can be a normal windows user and must be configured in the configure web deploy publishing screen in the IIS. Sorry, I am not sure what else to advise to solve this issue. uninstall everything and Try the steps again from the beginning. Try this link as well. forums.iis.net/p/1176267/1974277.aspxChubb
I just spent two days on exactly the same thing. My problem was a typo. The name of my site was SampleService and in my script that called msdeploy I typed server:8172/msdeploy.axd?site=SampleServer (the actual names are longer making it that much less obvious).Foredoom
C
97

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

Caelian answered 6/1, 2015 at 22:5 Comment(3)
another nonsense/illogical bug from MS, made me wanna kill myselfKimbrough
This saved an hour at my work today. Thanks a lot. You deserve many upvotes.Meimeibers
This is the correct answer. However, I want to add that one should choose a "complete" installation when installing Web Deploy. The "recommended" install does not include the essential features.Rawden
B
49

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.

Barbarossa answered 9/12, 2013 at 19:16 Comment(3)
I would like to add that for an application under a website, the site name becomes "Default Web Site/myapp". Took me a while to figure out.Obturate
Example of an MSDeploy Url: https://{ServerName}:8172/MsDeploy.axd?site={siteName} You get this error when the site name is incorrect.Waybill
I had http:// in <DeployIisAppPath>xxx</DeployIisAppPath>After removing http:// published worked.Bellwort
C
17

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.

Cottager answered 13/12, 2014 at 15:6 Comment(2)
Thank you! almost cant believe I fell over that error.Bimolecular
This fixed it for me... all the other solutions were not it. Thank you!Apollinaire
E
4

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

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

Engrossment answered 11/12, 2013 at 6:26 Comment(2)
Thanks, often it's not the computer it's your own silly self!Dib
and - it hurts even more when you fall for it again!Dib
O
0

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.

Oast answered 10/8, 2017 at 15:4 Comment(0)
B
0

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

Bink answered 15/4, 2019 at 15:21 Comment(0)
H
0

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.

Hurdle answered 30/4, 2019 at 10:18 Comment(0)
H
0

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

Helices answered 6/3, 2020 at 14:45 Comment(0)
M
0

The resolution for my me was setting IIS Management Service to a new SSL certificate as explained in https://mcmap.net/q/244603/-setting-ssl-certificate-for-web-deploy-agent.

IIS Manager

Monotheism answered 7/2 at 21:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.