I am currently following the tutorial here
to deploy an ASP.NET app to my Azure VM using Visual Studio. There are two pre-requisites listed for the tutorial; I fulfill them both.
Unfortunately, I keep encountering this error:
Web deployment task failed. (Could not connect to the remote computer
("XXX.westeurope.cloudapp.azure.com") using the specified process
("Web Management Service") because the server did not respond. Make
sure that the process ("Web Management Service") is started on the
remote computer. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.)
Running the command net start wmsvc
gives me the following response:
The requested service has already been started.
When I run netstat -an
, I can verify that Port 8172 (to which I am trying to deploy my ASP.NET app) is listening:
TCP 0.0.0.0:8172 0.0.0.0:0 LISTENING
I have also ensured that there is an inbound security rule inside my firewall to allow all connections to Port 8172 via TCP. On my Azure portal, I have added the same security rule too.
Any ideas on how I may fix this issue?
Best Answer
After hours of trial and error (along with copious amounts of Googling), I managed to fix the issue.
The information provided by the tutorial here is incomplete/inaccurate. It is not sufficient to install Web Deploy simply by following the instructions given -- in fact, the claim that "Once Web Deploy is installed, the Web Management Service is started and set to automatic startup" (my emphasis) is false. Here is a screenshot taken from the
IIS
tab inServer Manager
:As you can see, the
Start Type
ofWeb Management Service
isManual
.After downloading and installing Web Deploy 3.6, one has to go to
Programs and Features
, findMicrosoft Web Deploy
, and then right-click and selectChange
. ClickNext
on the first page, thenChange
on the second page, and one will come across this window:Make sure that both
IIS Manager UI Module
(as well as everything beneath it) andRemote Agent Service
are selected.Once that is done, when one navigates to Server Manager and click on the
IIS
tab, one will see that both the Web Management Service and the Web Deployment Agent Service are now running automatically:Having done all these, one can now deploy an ASP.NET app directly on an Azure VM.