Web Deploy and Windows

I’m working a new app (more information on what and why in the near future), but part of the process for deploying the app is configuring a Windows server for Web Deploy. The instructions I’ve found on other sites haven’t been completely helpful so I thought I would provide some end-to-end instructions on how to configure Web Deploy on a Windows server. The context of these instructions is specifically for configuring a Windows server hosted by Azure, however the same instructions may be applied to a server hosted elsewhere.

What is Web Deploy?

Web Deploy is a tool provided by Microsoft for publishing .NET applications directly from Visual Studio or as part of an automated continuous deployment system.

Virtual machine creation

The first step is to create a virtual machine. The steps for creating the VM is typical. The only thing I will say is about selecting a VM size. While you may be able to get away with using an A0 sized VM for your application, it will be painful to configure the VM with so few cores and so little memory.

The strategy I used is to keep the VM size set to A0 during day-to-day activities, but when I need to configure the VM, I resize it to A2. This helps keep the cost of the VM down and keeps you from pulling out your hair during configuration.

Connecting to the VM

Once the VM is created, you will need to connect to it in order to begin configuring it. This task may be as simple as clicking the connect button on the VM dashboard page.

However, more than once, I’ve had an issue where the connect button is grayed out. The reason the connect button is grayed out is usually because the VM’s network security group is not configured to allow inbound RDP connections. If you have this issue, open the network security group for your VM and add an inbound security rule for RDP.

Add server features

Once you are connected to the VM, it’s time to install the features you will need. From Server Manager, click ‘Manage’ in the top right corner and select ‘Add Roles and Features’. This wizard will help you get the necessary features installed for your server.

Click ‘Next’ until you get to the ‘Select server roles’ screen and select ‘Web Server (IIS)’ from the provided list.

On the next screen, select ‘ASP.NET 4.6’, underneath ‘.NET Framework 4.6 Features’, to also be installed.

On the next screen, select the Application Development features you will need. The features you will need will vary, but ‘.NET Extensibility 4.6’ and ‘ASP.NET 4.6’ are typical. Also, select ‘Management Service’ to be installed.

Install Web Deploy

The next step is to install Web Deploy. To do this, download and install Web Deploy from, https://www.iis.net/downloads/microsoft/web-deploy. To make this possible, you will need to turn off IE Enhanced Security Configuration.

When installing Web Deploy, make sure to select the ‘Complete’ installation option.

Open the Web Deploy port

To leverage Web Deploy, you will need to allow connections to the Web Deploy port, 8172, both in the Azure network security group and the Windows server’s firewall.

Configure IIS

Open the IIS manager and select your web server from the Connections pane on the left hand side.  In the center pane, beneath ‘Management’, double click ‘Management Service’. In sure that the Management Services is started and that remote connections are enabled.

Test

That should do it for Web Deploy configuration. All that is left is to test it out by attempting to publish a .NET application via Visual Studio.

Hope you find this helpful and if you have any questions, please feel free to leave it in the comment section.

Leave a Reply

Your email address will not be published. Required fields are marked *