How to configure Web Deploy publishing feature on IIS so developer can publish?

44,990

Solution 1

It appears that one must still download the Web Deploy extension. Also, Version 3.5 is now available.

To download on a server, default IE security rules will require you add something like http://*.microsoft.com as a trusted site else you can't download the installer.

The whole package is rather large in its purpose and covers many deployment/backup/transfer type scenarios for IIS. So, when you install it, it turns into "Web Platform Installer 4.6" and installs roughly 10 prerequisites in addition to Web Deploy 3.5. Those prerequisites covers CLR Types, SQL Server framework (even if you don't have SQL Server installed), SQL Server shared management objects, etc. I did check afterwards if all these items are uninstallable through control panel (in case I changed my mind about web deploy) and they are there.

Finally, to configure web deploy on a site, I found this document:

http://www.iis.net/learn/publish/using-web-deploy/configure-the-web-deployment-handler

To find more information about this, google "web deployment handler".

It also does appear that you can configure secure authentication, which is the main reason I went down this Web Deploy publishing path instead of using plain clear-text FTP. However, http://www.iis.net/learn/publish/using-web-deploy/introduction-to-web-deploy says

Web Deploy is secure. Web Deploy supports transfer over HTTPS. Note that variants of FTP such as SFTP and FTPS are also secure.

I'm not sure if this means I will have to use an SSL certificate anyway. I was hoping Web Deploy provided more authentication options that were both secure and didn't need a certificate.

Solution 2

The answer marked correct pointed me in the right direction to publish a web site from Visual Studio 2013 to Server 2012. The Validate Connection button kept stating check Web Management service is installed.

As of April 2014 these simple steps work:

Install Web Deploy

In Powershell:
 (from: https://www.orcsweb.com/blog/jamie-furr/manage-and-install-iis8-on-windows-2012-server-core/)

  • Install-WindowsFeature Web-Server
  • Install-WindowsFeature Web-Mgmt-Service
  • Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WebManagement\Server -Name EnableRemoteManagement -Value 1
  • Net Stop WMSVC
  • Net Start WMSVC
  • netsh advfirewall firewall add rule name=”Allow Web Management” dir=in action=allow service=”WMSVC”

In IIS:
 (from http://blog.richardszalay.com/2013/02/02/building-a-deployment-pipeline-with-msdeploy-part-4-server-configuration/)

  • Create a new non-admin user
  • Once your user is created, we need to grant it permission to deploy the site. Right click on your website and select “Configure for Web Deploy Publishing…” from the “Deploy” sub menu
Share:
44,990
stackonfire
Author by

stackonfire

Updated on May 03, 2020

Comments

  • stackonfire
    stackonfire about 4 years

    I control a server running IIS 8 on Windows Server 2012. I want to publish a few basic asp.net websites with the Publish option in Visual Studio 2012. There are no good/current Microsoft articles on the server configuration steps.

    1) What exactly do I need to do on the server? I don't see any "web deploy" role option under the various IIS roles. I have read of some people downloading and installing "Web Deploy 3.0" from Microsoft but that file is one year old and it seems strange that I would have to download another file to use a promoted IIS file deployment option. If you are using IIS7 or IIS7.5 instead of IIS8 like me, please feel free to reply what YOU do, but let me know what version you are using.

    2) Is the authentication process encrypted? For example, FTP would send passwords in plain text. FTP over SSL doesn't but setting up even a self-issued SSL cert is annoying just to get secure authentication. So what about Web Deploy? Is it safe or no?

    3) Must I open port 8172 on the server's firewall? Microsoft's documentation says I "might need to".

    4) On the Visual Studio side, it wants an account for authentication. Is this a Windows account on the server? Should I then right click the IIS website folder on the server and add this user there or is there some other preferred way of mapping users to websites? If so, what rights are required?

    Please answer any or all of the above but please focus on the server side configuration and not the client (visual studio). Please don't suggest FTP as I am truly wanting to try Web Deploy. I am adding an IIS 7.5 tag too since some of the answers may be the same as for IIS 8.

  • QFDev
    QFDev over 10 years
    Thank you for this detailed post. I agree the documentation is not great, I've spent the last couple of hours trying to get my head around this.
  • webworm
    webworm about 10 years
    Just an FYI, IIS 8 no longer has the Configure for Web Deploy Publishing option under Deploy
  • Paul Lockwood
    Paul Lockwood almost 10 years
    What a surprise :) Personally I have moved back to xcopy deploy. Much simpler and whatever Microsoft changes xcopy is still going to work + all of our team understand how it works.
  • webworm
    webworm almost 10 years
    I agree with you. I have been trying to figure out Web Deploy but packages must be installed in just the right order. Web Platform Installer does not seem to be able to pick up the proper dependencies. I will also be using xcopy.
  • Paul Lockwood
    Paul Lockwood almost 10 years
    Ha - it seems xcopy is marked as deprecated since Vista/ Sever 2008. RoboCopy is its replacement: en.wikipedia.org/wiki/Robocopy Our xcopy/Robocopy scripts are working fine though - much simpler
  • Dan
    Dan almost 9 years
    Weird, 3.6 is showing up in Web PI, but not on the ASP.NET Deploy & Migrate page??
  • Erik Funkenbusch
    Erik Funkenbusch over 8 years
    @webworm - No, IIS 8 does still have the Configure for Web Deploy Publishing, at least if you're using it on Windows Server 2012 R2. If you're using IIS8 on Windows 8.x then it doesn't support some of the extensions.
  • OutstandingBill
    OutstandingBill about 8 years
    Installing Web Deploy 3.6 does not create the Management Service Delegation tool. I had to uninstall 3.6 and install 3.5 before I could use Management Service Delegation.
  • OutstandingBill
    OutstandingBill about 8 years
    Like @SteveC said, there's still no mention of 3.6 on the Web Deploy home page.
  • Chris Marisic
    Chris Marisic about 8 years
    I don't understand how Microsoft can make installation experiences so bad. I'm installing web deploy, clear i actually want to be able to have remote deployments! At the very least it should prompt me on install.