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.
Select the project, right click and select publish. On the publish window, expand More Options and select Microsoft Azure Virtual Machines. You will be then asked to login to the Microsoft Azure account. Login to your Azure account and then select the Windows VM you have created already.
Setup Visual Studio 2022 VM in AzureNavigate to the Azure Portal at https://portal.azure.com and login to your Azure Subscription. Navigate to the Azure Marketplace and search for Visual Studio 2022, then click on it in the list. Select the Visual Studio 2022 edition to install, then click Create.
Create or open an Azure cloud service project in Visual Studio. In Solution Explorer, right-click the project, and, from the context menu, select Convert > Convert to Azure Cloud Service Project. In Solution Explorer, right-click the newly created Azure project, and, from the context menu, select Publish.
The reason the VM does not appear in the Select dropdown list is probably because:
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With