Search code examples
asp.netiiswebdeployweb-platform-installer

Web Platform Installer (WPI) alternative / Replacement


I'm trying to setup a Web Deploy publish method within Visual Studio for an ASP.NET Web Application [Web Forms project]. In all the learn.microsoft articles it recommends Web Platform Installer (WPI). However WPI has been sunset and it's not supported/Running.

I've attempted to install the Web Deploy portion individually, however VS is unable to connect with: "Could not connect to the remote computer. On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service" is started."

The documentation specifically states that installing Web Deploy directly "will not configure Web Management Service"

That said, what's the recommended way of configuring a Web Server (Windows Server 2022), to be the target of a Web Deploy Publish?


Solution

  • I was able to locate a method of installing "Web Management Service" through the Management Tools within Add Features, or by using PowerShell. I followed the article here: Install IIS Web Management Service for Remote IIS Administration and Management, which goes step by step to install, start, and configure the Firewall rules. I'll describe them here incase that link stops working in the future.

    1. Install Management Service: This can be done with PowerShell running as Admin:
      Install-WindowsFeature Web-Mgmt-Service Or by opening "Add Remote Features" wizard > Server Roles > Web Server (IIS) > Management Tools > And selecting "Management Service"
    2. Enable Remote Management: This can be done using PowerShell as well: Set-ItemProperty HKLM:SOFTWARE\Microsoft\WebManagement\Server -Name EnableRemoteManagement -Value 1 -PropertyType DWORD -Force & Set-ItemProperty HKLM:SOFTWARE\Microsoft\WebManagement\Server -Name RequiresWindowsCredentials -Value 1 -PropertyType DWORD -Force.. However this step did not work for me, and instead I used IIS > Select the Server Node from the Connection Tree view (left side) > Double Click "Management Services" > Check "Enable Remote Connections" and Selecting Apply and Start. Note If options are grayed out you only need to press stop from the action pane to stop the service
    3. Add IIS Remote Management Rule in Windows Firewall: PowerShell- By Service: netsh advfirewall firewall add rule name="IIS Remote Management" dir=in action=allow service=WMSVC or By Port: netsh advfirewall firewall add rule name="IIS Remote Management" dir=in action=allow protocol=TCP localport=8172 or by using the Windows Firewall GUI.

    There are also some additional resources I found while drafting this response here: Configuring remote Administration and feature delegation in IIS 7 which goes into more details upon configuring the Management Service and IIS after the fact to get it connect. I had several validation errors when initially setting up the Web Deploy package for my Visual Studio project, but I was able to troubleshoot those issues and get the publish to run successfully to the remote server.