Azure Web App service deployments related issues

This article lists some common issues related to Azure Web App service deployments from Azure DevOps Services and provides steps to resolve or debug these issues.

Note

Check Status history to see if you may be impacted due to an outage in Azure DevOps Services.

Common issues and solutions

Error: "No package found with specified pattern in the task"

Verify that the package mentioned in the task is published as an artifact in the build or a previous stage and downloaded in the current job.

Error: "Publish using zip deploy option is not supported for MSBuild package type"

Web packages created using the MSBuild task (with default arguments) have a nested folder structure that can only be deployed correctly by Web Deploy. The publish-to-zip deployment option can't be used to deploy those packages. To convert the packaging structure, follow these steps.

The task fails with a 5xx error code

A release hangs for a long time and then fails, a "503 service unavailable" error occurs, or the deployment history in the deployment logs fails to update

These issues may occur when there's insufficient capacity on your App Service Plan. To resolve these issues, you can scale up the App Service instance to increase available CPU, RAM, and disk space or try with a different App Service plan. Also, check the Kudu logs from the Azure Web Apps side.

Review the following articles for firewall, proxy, and permissions (applicable for all platforms). These articles provide references for Microsoft-hosted and self-hosted agent scenarios.

The task fails with the error: "Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired"

Note

There might also be other scenarios when issues with the Azure service connection impact the deployment.

SSL error in the App Service or Web App deploy task

To use a certificate in App Service, it must be signed by a trusted certificate authority. See SSL error to resolve this error.

Web Deploy error in the App Service deploy task

If you're using Web Deploy to deploy your app, in some error scenarios, Web Deploy will show an error code in the log. To troubleshoot a Web Deploy error, see Web Deploy error codes.

Error "ERROR_FILE_IN_USE" while trying to deploy .NET apps to Web App on Windows

To resolve this error, ensure the Rename locked files and Take App offline options are enabled in the task. For zero downtime, use slot swap.

Web App deployment on Windows is successful, but the app isn't working

This issue may occur because the web.config file isn't present in your app. To add a web.config file, follow these steps.

Web App deployment on App Service Environment (ASE) isn't working

Follow these steps to ensure you're deploying correctly.

Failed to deploy a Function App using the AzureRmWebAppDeployment task

Consider using the AzureFunctionApp@1 - Azure Functions v1 task.

Guidance on deploying an app to Azure Web App

See the following tutorials about deploying apps of various languages to Azure Web App: