Failed to complete network deployment task. Failed to connect ... server did not respond

I published the Lightswitch application using Visual Studio 2012 RC for my localhost (Win 7, SQL 2008 R2, IIS 7.5). Now I am trying to publish to a remote server (Win 2008 R2, SQL 2008 R2, IIS 7.5) and I am having problems.

When I try to publish, I get the following error:

Failed to complete network deployment task. (Failed to connect to the remote computer ("###. ###. ###. ###") using the specified process ("Web Deployment Agent Service") because the server did not respond. Verify that the process ("Web Deployment Agent Service") runs on a remote computer computer. Find out more: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC .)

I checked each of the things the "learn more" link offers. I checked that MsDepSvc and WMSVC are working, and ports 80 and 8172 respond to port scans. In the publication settings for the service URL, I use the IP address ( http: //###.###.###.### ) of the remote machine. For the username, I use DomainName \ Administrator, which I use to log in using RDP.

I posted on the MSDN Forums where a member suggested that I cancel the website deployment tool from V2.0 to V1.1, which I did, but did not change anything.

Following the tips in the answer to this SO Question , I tried to start msdeploy from the command line.

From the command line on the server, I get:

C: \ Program Files \ IIS \ Microsoft Web Deploy> msdeploy -verb: dump -source: dirpath = c: \ temp, computername = http: // SeverName: 80 / msdeployagentservice, username = Administrator, password = XXXX -verbose -debug Verbose: using the identifier 'c12c3392-2290-44b7-9434-dbd0ff5f9385' to connect to a remote server. Verbose: Preauthenticate remote agent URL ' http: // ServerName: 80 / msdeployagentservice ' as 'Administrator'. MSDeploy.dirPath (name = MSDeploy.dirPath) c: \ temp (name = dirPath) (keyAttribute = c: \ temp) (linkName = Child1)

From the command line on the dev machine, I get:

C: \ Program Files \ IIS \ Microsoft Web Deploy V3> msdeploy -verb: dump -source: dirpath = c: \ temp, computername = http: //###.###.###.###: 80 / msdeployagentservice, username = Administrator, password = XXXX -verbose -debug Information: Use the identifier '7f0b7d5b-e202-424c-a7dd-246920253081' to connect to the remote server. Verbose: pre-authentication remote agent URL ' http: //###.###.###.###: 80 / msdeployagentservice ' as "Administrator". Verbose: pre-authentication of the remote agent URL ' http: //###.###.###.###: 80 / msdeployagentservice ' as 'Administrator'. Error code: ERROR_COULD_NOT_CONNECT_TO_REMOTESVC Additional information: Failed to connect to the remote computer ("###. ###. ###. ###") using ("Web Deployment Agent Service") because the server did not respond. Verify that the process ("Web Deployment Agent Service") is running on the remote computer. http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC . Find out more: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC . ---> Microsoft.Web.Deployment.DeploymentException: an object of type 'dirPath' and the path 'c: \ temp' cannot be created. ---> System.Net.WebException: the remote server responded with an error: (400) Bad request. in System.Net.HttpWebRequest.GetResponse () at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponse (HttpWebRequest request) --- End of internal exception stack check --- --- End Internal exception stack trace --- with Microsoft.Web .Deployment.DeploymentManager.CreateObjectPrivate (DeploymentProviderContext providerContext, DeploymentBaseOptions baseOptions, DeploymentObject sourceObject, String serverVersion) at Microsoft.Web.Deployment.DeploymentManager.CreateObject (DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions) at MSDeploy.MSDeploy.CreateObject (DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions) at MSDeploy.MSDeploy.ExecuteWorker () in MSDeploy.MSDeploy.Execute ()
in MSDeploy.MSDeploy.Main (String [] unusedArgs) Number of errors: 1.

Using Wireshark, I found that I am logging in, but after POST /MSDEPLOYAGENTSERVICE I get a 400: Bad error message that looks like this:

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">\r\n <HTML><HEAD><TITLE>Bad Request</TITLE>\r\n <META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>\r\n <BODY><h2>Bad Request - Invalid Content Length</h2>\r\n <hr><p>HTTP Error 400. There is an invalid content length or chunk length in the request.</p>\r\n </BODY></HTML>\r\n 

The only thing I could find mentioned was this specific behavior: Microsoft Support Article for ISA Server 2000.

What else should I watch?

+42
visual-studio iis deployment webdeploy msdeploy
Aug 03 '12 at 13:35
source share
20 answers

I came across this yesterday. In my scenario, it completely boiled down to the fact that in the publish settings, where it asks for Site Name: I provided MyApplication . When he really expected me to provide:

 Default Web Site/MyApplication 

I talked about this with the Microsoft Deployment team, so I hope they can add clarity to the fact that if you do not specify an existing site name that is not a website deployment server, this error makes you think.

+50
May 31 '13 at 15:01
source share

I had the same problem with Web Deploy 3.5 when I installed it using "Web Platform Installer 5.0"

When I tried to publish from Visual Studio, I got this error:

 --------------------------- Microsoft Visual Studio --------------------------- Could not connect to the remote computer ("10.0.3.102") 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: (403) Forbidden. --------------------------- OK --------------------------- 

I checked the services twice, both were running. I also turned off the firewall and still the same error.

How I solved this problem:

  • open the Add or Remove Programs
  • Click "Microsoft Web Deploy"
  • Click the "Change" button (except for "Delete")
  • Click "Next" in

enter image description here

  1. Click "Edit" in

enter image description here

  1. Add features marked in red X

enter image description here

  1. Complete installation

    Result : publishing from Visual Studio works

+49
Oct 08 '14 at 10:10
source share

I had the same problem and decided to delete all the web deployment folders in the program (x86) \ IIS files and in the Program Files \ IIS.

After that, I reinstalled web deployment 1.1 and web deployment 3.0 without embedded SQL.

+11
Nov 27
source share

To solve the problem, I used the following steps: Server: WS2012. DEV Vs2012 Project MVC4.

1) Create an empty site on the server with the required name or use the "Default website" when publishing, unless you renamed the default something else.

I used the information in this link

On the server using WPI, install

Install Web Deployment (3.5) for Server Hosting

Recommended Server Configuration for Web Hosting Providers

I made sure that other versions where NOT installed

So, check the name of the site you are using. I am using AdminUI. This is an empty site created on a test server.

Site Name is important.

So, when using the Wizard, map the site name

Publish wizard

Verify that the appropriate services are running on the server . And you have sufficient privileges to write to the site

services

+6
Aug 02 '13 at 3:33
source share

I was able to fix this on my server by restarting the web management service

+4
Mar 11 '14 at 7:46
source share

What Chris said: "When he really expected me to provide" Default Web Site / MyApplication. " The actual words are "Default Web Site" and not your server name.

I had it too, and for hours I hit my head against the wall until I tried it. (Thanks to Chris!)

FWIW, I used the default website name (server name), and not the word "Default website", which apparently MUST be used. Some kind of lame, but at least I know now.

+2
Jul 17 '13 at 15:41
source share

I also spent several hours on this error ( ERROR_COULD_NOT_CONNECT_TO_REMOTESVC ) today, the funny part was that I was able to deploy using gui contructed Properties/PublishProfiles/<Profile>.pubxml (via right click on project -> Publish... -> create via wizard ).

In my case, however, I accidentally messed up the <DeployIisAppPath> attribute. To do this, specify SiteName instead of ApplicationPool/SiteName . Here is the complete block from my *.csproj file:

 <Project ...> ... <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DEV-Deploy|AnyCPU'"> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x64</PlatformTarget> <ErrorReport>prompt</ErrorReport> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <DeployIisAppPath>HERE GOES THE SITE NAME ONLY</DeployIisAppPath> </PropertyGroup> ... </Project> 

So, if you configured SiteName as Foo, the last part of this configuration block will be <DeployIisAppPath>Foo</DeployIisAppPath> .

In addition, all the information on the IIS Site for error codes really did not help.

+1
Sep 19 '13 at
source share

Failed to complete network deployment task. (Failed to connect to the remote computer.)

In my case, everything, I had to restart the web deployment agent service in a remote window.

+1
Apr 24 '15 at 15:47
source share

Using information from several forums and answers, I finally managed to install Microsoft Web Deploy so that I could use it to publish from Visual Studio successfully (tested without an activated firewall):

  • Install Management Services for IIS using Add Role Features in Server Manager
  • Install the web deployment (Important: โ€œFinishโ€ and after the Management Services has been installed) http://www.iis.net/downloads/microsoft/web-deploy#additionalDownloads

  • Server-Level Provisioning in IIS

    • Open the Management Service
    • Allow Windows and IIS Credentials
  • In IIS at the site level
    • Open 'IIS Manager Permission'
    • Add the user who will be used for the actual publication, for example. Administrator

If the firewall is active: turn on File Sharing and Manage Remote Services

+1
Jul 20 '16 at 14:44
source share

Same issue for AWS EC2 instance.

  • Browse to EC2 instances , select the appropriate instance and in the Descriptions section copy Security Groups name

enter image description here

  1. Go to the Security Groups section and select the appropriate security group and add the following Rule Entry , if missing

enter image description here

+1
Sep 17 '17 at 15:13
source share

I had the same problem. Finally, I solved it by changing https to the service URL.

0
Nov 28 '12 at 8:20
source share

I also got this working by removing all web deployments, and then installed only Web Deploy 2.0.

0
May 15 '13 at 12:29
source share

Also, make sure that the local call finder (RPC) service is running.

0
Jul 22 '13 at 18:54
source share

I solved this by putting the word "Default website" in the text box of the site name when publishing using the wizard in Visual Studio 2013

0
Dec 19 '14 at 3:08
source share

Just remove http: // from http: // SeverName: 80 / msdeployagentservice . Also try using ServerName. I had this problem and decided to remove http: //

0
May 08 '15 at 18:28
source share

I set my username and password, which were used in the iis web deployment configuration , in the visual studio connection window , and this works fine for me ..

0
Jun 30 '15 at 11:48
source share

I had a different situation when it suddenly stopped working for me.

This happened because I had the IP address restriction specified in the Management Service, and my provider assigned me a new IP address. I forgot that I indicated it.

  • Open IIS Manager
  • Click on the server name in the tree on the left
  • In the Features view, select Management Service
  • Stop the management service in the right pane.
  • Add a new IP address in the IP Address Restrictions section and delete the old one
  • Apply changes and start the service again
  • Update your serverโ€™s documentation troubleshooting section in the following ways :)
0
Sep 19 '15 at 21:25
source share

Apparently for me it is just restarting my visual studio / rebooting my computer and redeploying, republishing my web application.

0
Dec 6 '15 at 5:04
source share

I had the same error. This happened because I configured a proxy server that was not on this network.

0
04 Feb '16 at 13:52
source share

Install the latest version of Microsoft Web Deployment Tool. You can use the link below. https://www.iis.net/downloads/microsoft/web-deploy

-one
Aug 17 '17 at 15:27
source share



All Articles