Courseiva
Design and implement build and release pipelineshardMultiple ChoiceObjective-mapped

Why an App Service Deployment Succeeds but the App Never Starts

Network Topology
resource-group myRGname myAppsrc ./deploy.zipRefer to the exhibit.```powershell# Azure CLI script```

You run the Azure CLI command shown in the exhibit as part of a release pipeline to deploy a ZIP package to an Azure App Service. The deployment succeeds, but the app does not start. What is the most likely cause?

Quick Answer

A ZIP-deploy that succeeds but never starts the app almost always means the App Service's startup command was never configured — az webapp deploy pushes the code but doesn't set how to run it, so the platform falls back to a generic handler that doesn't know how to launch something like a custom Node or Python entry point. Setting --startup-file explicitly (via az webapp config set or the portal) fixes it.

⚠ Common exam trap

It's easy for candidates to assume a successful deployment (no CLI errors) guarantees the app will run, but Azure App Service separates the deployment of artifacts from the runtime configuration, so a missing startup command is a common silent failure.

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 app's startup command is not configured

The Azure CLI command `az webapp deploy` deploys the ZIP package to the App Service, but it does not configure the startup command. If the application (e.g., a Node.js or Python app) requires a specific startup file or script (like `npm start` or `gunicorn`), the App Service will fail to start because it defaults to a generic handler. The startup command must be set via the `--startup-file` parameter in `az webapp config set` or in the Azure portal.

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 app's startup command is not configured

    Why this is correct

    ZIP deploy does not set startup command; needs manual config.

  • The resource group name is incorrect

    Why it's wrong here

    If incorrect, the command would fail.

  • The runtime stack is not specified in the command

    Why it's wrong here

    Runtime stack is set in the app settings, not in deploy command.

  • The deployment slot is not specified

    Why it's wrong here

    Slot deployment is optional.

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 →

How Courseiva writes practice questions · Editorial policy

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. You are creating a release pipeline that deploys to Azure App Service. You want to ensure that the deployment uses the 'Run from package' feature for faster deployments and reduced downtime. Which deployment method should you select in the 'Azure App Service deploy' task?

easy
  • A.Web Deploy
  • B.Container
  • C.RunFromPackage
  • D.Zip Deploy

Why C: The 'Run from package' feature deploys your app as a zip package directly to Azure App Service, bypassing the file copy and compilation steps of traditional methods. This reduces deployment time and downtime because the app runs from the package without extracting it to the wwwroot folder. Selecting 'RunFromPackage' in the Azure App Service deploy task enables this behavior by setting the WEBSITE_RUN_FROM_PACKAGE app setting to 1.

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.