61

I'm setting up a new server on Windows 2008 (x64) with IIS 7.5. I have installed Web Deploy 2.1 from the Web Platform Installer.

But the server is missing the Web Management Service, and as a result any web deploy fails with this message:

Error   1   Web deployment task failed.(Could not complete the request to remote agent URL 'https://url:8172/MsDeploy.axd?site=Default Web Site'.)
This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server.
Error details:
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 

I checked the services and found the necessary service is missing:

enter image description here

The Web Deployment agent service is installed (this is the IIS6 service), but not the Web Management service (the IIS7 deploy service).

How can I fix this? Does the Web Platform Installer not work for Web Deploy?

JK.
  • 21,477
  • 35
  • 135
  • 214

6 Answers6

103

Here is a current walkthrough as of April 2014:

  1. Install the Web Platform Installer on the server, which is available as a download from Microsoft.

    http://www.schiffhauer.com/wp-content/uploads/2014/04/2014-04-01_14-26-18.png

  2. Open Web Platform Installer, select "Products" at the top, and search for "Management Service". Click the "Add" button from the "IIS: Management Service" result , then click "Install".

    http://www.schiffhauer.com/wp-content/uploads/2014/04/2014-04-01_14-34-25.png

  3. Once the Web Management Service has installed, find it in the Services console. Set its startup type to Automatic and start it.

    http://www.schiffhauer.com/wp-content/uploads/2014/04/2014-04-01_14-38-19.png

  4. Open IIS. With the server node selected, find "Management Service" in the Features View.

    http://www.schiffhauer.com/wp-content/uploads/2014/04/2014-04-01_14-44-28.png

  5. Double click "Management Service" to open the feature. Stop it in the right panel if necessary to make edits. Check "Enable remote connections". When you are done making changes. Click "Apply", then click "Start".

    http://www.schiffhauer.com/wp-content/uploads/2014/04/2014-04-01_14-48-02.png

Chris Schiffhauer
  • 17,102
  • 15
  • 79
  • 88
  • 10
    Outstanding step by step walkthrough. – JasonCoder Jun 10 '14 at 14:25
  • 3
    Completely agree; outstanding answer. – user1477388 Oct 28 '14 at 14:48
  • Management Service does not appear in the WebPlatform installer anymore. I'm using Web Platform Installer 5.0 on windows 7 but this is also true for windows 10 – Anthony Phan Jun 27 '16 at 11:09
  • I still get an error connecting when trying to publish in Visual Studio 2017 to Windows 2012 R2 IIS. I followed all 5 of these steps successfully but it still insists that Web Management Service isn't started when it is. – Nathan McKaskle Jun 05 '17 at 17:31
  • 1
    Management service is located above Application Pools. Too bad Chris images are not available anymore... – Per G Nov 17 '17 at 09:42
  • Why tell us to search for "Management Service" when your next sentence has the full name of the service? – keeehlan Jun 07 '18 at 20:32
  • @PerG, you can still get them via The Wayback Machine. Sadly I don't have time to update all the links or embed the images at this time. I do have time however to note the irony in the edit history of this answer being claimed as "not susceptible to linkrot" ha! – RyanfaeScotland Jan 26 '23 at 14:52
23

Open Web Platform Installer(WPI) and add IIS: Management Service, under Products.

If you don't know where to find WPI go to IIS Manager -> Server Node -> Management Section in the Server. If it's not on there install it from http://www.microsoft.com/web/gallery/install.aspx?appid=WDeploy

14

In PowerShell:

Import-Module Servermanager
Import-Module WebAdministration
Add-WindowsFeature Web-Mgmt-Service
Ivan
  • 9,089
  • 4
  • 61
  • 74
11

Launch InetMgr.exe and while being on the server node in the tree view, select "Management Service". By default it is disabled, so you need to check "Enable remote connections".

kateroh
  • 4,382
  • 6
  • 43
  • 62
  • 2
    @DeveloperDan Link dead. Most recent Web Archive version: http://web.archive.org/web/20121005054118/http://tedgustaf.com/en/blog/2011/8/publish-aspnet-website-through-visual-studio-to-remote-server-using-web-deploy/ – dav_i May 09 '13 at 13:42
3

If you go into Add/Remove Programs, find Web Deploy, and hit Change, you should be able to add any missing features. Possibly the WebPI package you selected didn't install it by default (IIRC, there are multiple WebDeploy install packages).

Jimmy
  • 27,142
  • 5
  • 87
  • 100
0

Something to keep in mind, after following all these steps (IIS7) I couldn't enable remote connections because it was greyed out. So I stopped the Management Service, refreshed the console(still remained greyed), then clicked on the bottom Contents View tab and came back to the Features View tab, and finally it allowed me to enable remote connections. Looked like a bug to me after installing the product, but it maybe because I didn't upgrade to the latest Web Platform Installer.