14

I'm trying to publish my ASP.NET MVC4 web application, using Visual Studio 2013, to a virtual machine that I have up and running in Azure. The virtual machine has IIS installed on it.

I'm not using the Azure Web Sites feature because it does not support virtual networks, yet, and thus cannot be configured to connect to a SQL Server database, running on an Azure VM, using a private LAN IP. So, this publish question does not pertain to the simpler publish-to-azure-websites feature.

The GUI for Visual Studio's publish feature first starts with a prompt to select my target publish destination. On this prompt, I choose to publish to a Windows Azure Virtual Machine. It's brings up a prompt that has a drop-down menu in which I expected to be able to select my existing virtual machine. There's a loading spinner icon which makes me think it's connecting to Azure to query for the available VMs. My VM is never select-able though - the drop-down list is empty. It shows that I'm signed in using the expected username.

What do I have to do to make my VMs, within Azure, appear in this drop-down list so that I can easily publish to them?

I've installed a complete installation of Web Deploy and I created an endpoint for TCP port 8172.

Ryan
  • 867
  • 9
  • 23
  • Why did you install SQL Server on a VM instead of using the provided interface for it? Much simpler to manage. – mason Jul 17 '14 at 02:00
  • What provided interface? The Azure SQL service? It does not support full-text searching. I'm working on a project that had 1 requirement - full-text searching with SQL Server. I was sad to learn that I have to manage my own VM with SQL Server. :( I also have to manage my own VM with IIS now, because their Web Site service does not support their own virtual network service. So, I can't have a Web Site connect, using LAN IP, to a SQL Server on a VM - all within Azure. Kind of takes away all Azure's advantages over AWS, but whatever. – Ryan Jul 17 '14 at 02:02

2 Answers2

7

The reason the VM does not appear in the Select dropdown list is probably because:

  1. web deploy is not setup on your VM that is already provisioned on Azure, or
  2. not allowed through firewall for inbound connection or
  3. the web management service is not started or
  4. it is a windows 8 or 8.1 system
  5. [Update] You have an outdated version of Azure SDK (This was the issue in my case). Get The latest Azure SDK Here: http://azure.microsoft.com/en-us/downloads/
  6. OR Download it using Visual Studio itself from Menu option Tools > Extensions and Updates (assuming you are using VS 2013) Azure SDK Update Available

The following article describes all the steps to setup web deploy publishing on a windows server system: Troubleshooting Web Deploy problems with Visual Studio

The following article describes Web Deploy cannot be setup with Windows 8 or 8.1 system. Installing and Configuring Web Deploy on IIS 8.0 or Later

Hope this helps someone.

Steve Johnson
  • 3,054
  • 7
  • 46
  • 71
1

The simple answer was to use the IIS component installer application to install WebDeploy. Once WebDeploy is installed, and the ports for it are opened on the firewall, Visual Studio will be able to publish to that machine. Visual Studio's publish dialog may be empty for a few seconds, but I think it's downloading the details of the machine or something, because it will eventually appear in the publish-to drop-down.

Ryan
  • 867
  • 9
  • 23
  • 2
    I am having this issue. I have installed the azure sdk 2.4 (latest available as i write this), but vs shows that the same update is available. I proceed to re-install and it still shows as an available update. None of my virtual machines are listed. I have more than one subscription linked to the same microsoft account. Should have at least 3 vms in display. Idk what to do :( Did you try something else that perhaps you didn't put here? – MilkyWayJoe Nov 08 '14 at 04:34