Web Deploy results in ERROR_COULD_NOT_CONNECT_TO_REMOTESVC

╄→гoц情女王★ 提交于 2020-01-20 16:08:47

问题


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?


回答1:


If you install Web Deploy 3.5 BEFORE Web Management Tools are installed, you'll have to re-install it. I beat my head against the wall for hours on this. Install the Web Management Services (Roles -> Web Server > Management Tools > Management Services). Then uninstall Web Deploy (repair didn't work), and then install it again. Fixed. /Sigh




回答2:


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

Ben Day blogged more about it.




回答3:


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.




回答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.




回答5:


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.




回答6:


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




回答7:


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.



来源:https://stackoverflow.com/questions/18739342/web-deploy-results-in-error-could-not-connect-to-remotesvc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!