I'm experiencing problems trying to deploy an ASP.NET MVC .NET 6 app using Web Deploy
I’m working on a new web app. I’ve written the app using .NET 6 (their long-term support using .NET Core) which I’m trying to deploy to website a website on server one of our servers. I’ve already set up a website within IIS 10 on the server. I’ve created the application pool for it. I found that Web Deploy wasn’t installed, so I installed Web Deploy 3.6 onto that server. When I try to deploy from Visual Studio 2022 to that website on that server, I get this error message:
Could not connect to the remote computer. On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it
Publish failed to deploy.
In researching this I’ve not found anything that helped. In fact, some search results were ludicrous. Some more helpful discussed configuring Manager permissions in IIS.
I’ve been following this Microsoft webpage to help me configure the site: https://learn.microsoft.com/en-us/iis/install/installing-publishing-technologies/installing-and-configuring-web-deploy-on-iis-80-or-later
I was in IIS on the server trying to configure those Manager Permissions https://learn.microsoft.com/en-us/iis/install/installing-publishing-technologies/installing-and-configuring-web-deploy-on-iis-80-or-later#using-the-iis-manager-to-configure-web-deploy-for-a-non-administrator however, the Management portion related to PHDPharmacyDev in IIS on DOHR2SIMPHARW01 only has Configuration Editor; no IIS Manager Permissions nor Web Platform.
The error means the service is not running or maybe a firewall is blocking the port. Contact your server or network administrator for assistance.
If you have access to the server it is easier to deploy the .NET 6 application to a local folder then copy the folder contents to the server.
Hi @Rod At Work ,
You can refer to the Troubleshooting Web Deploy problems with Visual Studio to narrow down the problem:
- Is the required process ("Web Management Service") is Started?
- Is the Management Service configured to allow remote connections?
- Is the service URL correct? By default, the Web Management Service listens on port 8172, but this can be changed.
- Have IP restrictions been configured for the Management Service?
Agree with AgaveJoe, if you can access the Server, deploy the application to a local folder and copy it to the server is a workaround.
Hi @Zhi Lv - MSFT ,
I've checked in the server's Services app; the Web Management Service is not running. In fact, it isn't even listed in the Services app. I've tried to find a way of starting it, without success. In fact, what I've found isn't clear to me. Is the Web Management Service an additional feature that needs to be added to the server, by using Update Windows?
The answer to your second question is dependent upon getting Web Management Service running.
When I try to publish to the website, I've noticed that it does use port 8172.
The answer to your fourth question is like the answer to the second question.
Hi @Rod At Work ,
Here is an article about Configuring Web Deploy on IIS 8.0 or Later, you can refer to it: Installing and Configuring Web Deploy on IIS 8.0 or Later and Configuring a Web Server for Web Deploy Publishing (Web Deploy Handler).
Sign in to comment