Blog Post

Setting up web deploy on Azure VM - new UI

Thursday, October 27, 2016 1:44 PM

A little background for this post. This is first time for me working with Azure. I have hard loads about it and how amazing or awful other people experience has been, so I have decided to look into it. Pluralsight has a few courses and they are as old as 2014. The surprise from me was there is new design and features that has been in preview are now fully baked, yet the courses are not and we have new BLADE design, so it does not look the same. Great start.

So I have created my first VM at random and I want to deploy my dummy web application using web deploy.

Original blog post how to setup webdeploy

SETTING UP WEB DEPLOY ON AZURE VMS

For starters, I will provide instructions on how to install IIS in case that hasn’t already been done. An easy starting point for enabling the IIS Role and additional features is to use the Web Platform Installer. After you have installed this application, follow these steps:

1. Run Web Platform Installer and search for IIS Recommended.

2. Click Add to select IIS Recommended Configuration to be installed.

3. Search for IIS: ASP.

4. Click Add on the IIS: ASP.NET 4.5 option.

5. Click Install at the bottom of the window and then click I Accept to begin the installation procedure.

This process enables the IIS Role, applies the recommended feature configuration and enables .Net 4.5. Installing these features will configure IIS correctly to serve ASP.Net websites and applications. Any additional IIS features that are required will need to be installed. For reference, here are the features that are installed using this method:

image.png

There are a few things to remember when deploying Web Deploy. More than just Web Deploy needs to be installed/configured. The IIS Management Service is used to configure remote connections to the IIS instance as well as who is authorized to connect. This can be installed either via WPI or Roles and Features with-in Server Manager itself. For this demonstration, I will use WPI to install the remaining applications. After launching WPI, search for Management and choose Add for the IIS: Management Service and then repeat for Web Deploy. Click Install. The following screen shows the selected applications ready for installation.

image.png

Click I Accept to complete the installation of the features and all dependencies.

Once the installation has completed, there will be new features added to IIS Manager. Open IIS Manager to configured the Management Service. Double click on the Management Service icon to begin.

image.png

Once the feature configuration page is open, there are a few settings that needs to be updated. If the service is running, you can not make updates to the settings. Click Stop in the Actions pane if this is the case. To begin with, check the Enable remote connections setting. Rather than having to maintain IIS Manager users, I choose Windows credentials only. Notice the Enable failed request tracking option below the log setting. In the event of issues using Web Deploy, you can enable this setting to gather additional information. For additional security, you can also set IP Address Restrictions. You can restrict access to specific IP addresses by changing the Access for unspecified clients to Deny. After doing that, add an Allow entry for any IP Addresses that should be allowed to connect.

image.png

Click Apply to save the settings and then Start to start the Management Service. Minimize or close IIS Manager.

To ensure that the server is now listening on port 8172, open a command prompt and run netstat –aon | findstr :8172. You should see at least the following response. You could see others depending on your server configuration. If you do not get any response, check services and ensure that the Web Management Service is running. If it is running, check the above steps and ensure that everything is configured correctly.

image.png

We will now check the Windows Firewall to ensure that the rule for Web Management Service (HTTP Traffic-In) is enabled. This rule is created when the Web Management Service is installed.

image.png

The last thing that will need to be configured is the endpoint for your Azure VM. Login to the Azure portal and navigate to your Virtual Machine endpoints. This is done differently depending on if you are using the classic portal (manage.windowsazure.com) or the new portal (portal.azure.com). Once you have located the Endpoints configuration screen for your VM, add an entry for Web Deploy for port 8172.

image.png

You are now ready to connect using Visual Studio and deploy your website or application.

For reference, here is what a deployment configuration within Visual Studio looks like.

image.png

 

How did I make it work

1, Create/assign (local) user used for web deploy 

2, Installing Windows Management Service (WMSVC)

Install Management Service option using server manger by adding Roles / Features

Now we can run command to start the service using command or services.msc

Net start msdepsvc

3, Web Deployment tool (service MSDEPSVC)

Install web deployment tool.

https://technet.microsoft.com/en-us/library/dd569059(v=ws.10).aspx

 

4, Setup service user access

To apply user account to service use services.msc. Locate the service by the name and change the access to be the user you have created.

5, Firewall access on azure port

Ensure you have firewall configuration open not only on the VM but also on the network level (in azure)for TCP port 8172

 

Helpful information below 

ERROR_DESTINATION_NOT_REACHABLE

Diagnosis - Web Management Service or Remote Agent is not installed or unreachable on the remote computer.

Resolution - Verify that Remote Agent Service or Web Management Service are started on the remote computer, depending on which one you are connecting to. You can do a "net start wmsvc & net start msdepsvc" on the remote computer to ensure these services are started. Also, ensure that a firewall is not interrupting communications with the destination. 

Blog
Products
Error pages
Links and tools