Fixing a Deployment Failure Caused by a Runtime Stack Mismatch
Exhibit
Refer to the exhibit.
```powershell
# Output from Azure CLI
{
"id": "/subscriptions/.../resourceGroups/rg-prod/providers/Microsoft.Web/sites/app-prod",
"kind": "app,linux",
"siteConfig": {
"linuxFxVersion": "DOTNETCORE|6.0",
"appSettings": [
{
"name": "ASPNETCORE_ENVIRONMENT",
"value": "Production"
}
]
}
}
```Refer to the exhibit. An Azure CLI command outputs the configuration of an Azure Web App. Your pipeline deploys to this Web App using the 'AzureWebApp@1' task. The deployment fails with an error indicating that the runtime stack is not supported. What is the most likely cause?
Quick Answer
A 'runtime stack is not supported' failure on an AzureWebApp@1 deployment means the Web App's configured stack — DOTNETCORE|6.0 in this case — doesn't match what the deployed application actually targets. The task deploys according to the Web App's own stack setting, so if the app was built for a different runtime version, the mismatch causes the deployment to fail outright.
⚠ Common exam trap
A common mix-up: candidates confuse runtime stack errors with environment variable misconfigurations (like ASPNETCORE_ENVIRONMENT) or OS-level issues, but the error message directly points to a mismatch between the Web App's configured stack and the deployed application's framework.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The runtime stack (DOTNETCORE|6.0) is not compatible with the deployed application.
The error 'runtime stack is not supported' indicates that the Azure Web App's configured runtime stack (DOTNETCORE|6.0) does not match the application being deployed. The AzureWebApp@1 task uses the Web App's stack setting to determine how to deploy and run the code; if the deployed app requires a different runtime (e.g., .NET 8.0 or a non-.NET framework), the deployment fails. Option C correctly identifies this mismatch as the root cause.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The Web App is not a Linux app.
Why it's wrong here
The 'kind' shows 'app,linux', so it is a Linux app.
- ✗
The ASPNETCORE_ENVIRONMENT setting is incorrect.
Why it's wrong here
The setting is 'Production', which is valid.
- ✓
The runtime stack (DOTNETCORE|6.0) is not compatible with the deployed application.
Why this is correct
If the application targets a different runtime version, the deployment fails.
- ✗
The resource group name is incorrect.
Why it's wrong here
The resource group appears correct in the output.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Pipeline
A pipeline is an automated series of steps that takes code from development to production, ensuring quality and speed.
Key term
Task
A Task in Azure DevOps is a predefined, reusable step that performs a specific action during a build or release pipeline, like compiling code or running tests.
About these practice questions
This AZ-400 question is part of Courseiva's 823-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on AZ-400
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Which TWO tasks can be used to deploy an Azure Web App using YAML pipelines in Azure DevOps?
medium- ✓ A.AzureWebApp
- B.CopyFilesOverSSH
- ✓ C.AzureRmWebAppDeployment
- D.AzureFunctionApp
- E.AzureVMAppDeployment
Why A: The AzureWebApp task is correct because it is the dedicated Azure DevOps YAML pipeline task for deploying code to an Azure Web App (App Service). It supports deployment methods like Web Deploy (msdeploy), Kudu REST API, and ZIP deploy, making it the standard choice for web app deployments.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.