Azure Web App - VS2019 Publish - Fails randomly

Jordon Kraft 1 Reputation point
2021-02-03T01:56:49.223+00:00

I have a few deployments of the same code (dev, test, production, etc..), its a asp.net 3.1 website.

Currently I just deploy to each app service through Visual Studio 2019 Publish window. I will want to setup azure pipelines at some point but right now it isn't a priority.

The app runs fine, the problem I have is that randomly I will get this error during publish:

Severity Code Description Project File Line Suppression State
Error Web deployment task failed. (Could not connect to the remote computer ("<myapp>.scm.azurewebsites.net") 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: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.)

Could not connect to the remote computer ("<myapp>.scm.azurewebsites.net") 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: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.
The remote server returned an error: (400) Bad Request. RiseFSM 0

It could be after 3 deploys, could be after 20, could even happen the same day as a successful publish. The only way I have fixed it is by deleting the app service and re-deploying and configuring for the environment.

Here are the links I have reviewed that didn't help.
search
web-deploy-error-codes - I don't know how to "ensure msdepsvc or wmsvc service is started on the remote server" since its a app service.

I am stuck and would really like some help fixing this issue.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,915 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Stan Syniavskyi 16 Reputation points
    2021-08-17T21:38:54.897+00:00

    For me, lack of free space in app service cause that issue. Deleting some old log files via kudu resolved the issue right away

    3 people found this answer helpful.
    0 comments No comments

  2. brtrach-MSFT 15,256 Reputation points Microsoft Employee
    2021-02-03T03:39:24.757+00:00

    @Jordon Kraft We apologize for the error that you are receiving when performing your deployment.

    Can you please try to set an app setting for your web app? The app setting and value are WEBSITE_WEBDEPLOY_USE_SCM = false

    Please let us know if this setting resolves the error. We look forward to your reply.

    2 people found this answer helpful.