Courseiva

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 via Azure CLI unpacks files but App Service runs no build automation, so without an explicit startup command the container has no entry point and the app never launches. The deployment succeeds because files land correctly; the failure is purely at process start.

  • ✗

    The resource group name is incorrect

    Why it's wrong here

    A wrong resource group name would make the deployment fail outright, yet the stem states it succeeded, so this cannot explain the app failing to start. It tempts because resource group mistakes are a common deployment error, but here the ZIP deployed and the startup command is the actual problem.

  • ✗

    The runtime stack is not specified in the command

    Why it's wrong here

    The runtime stack is configured on the App Service plan or web app, not passed in the deployment command, so omitting it does not stop the app starting. It tempts because stack mismatches do cause startup failures, but the deployment command's startup behaviour is governed by the app's startup command setting.

  • ✗

    The deployment slot is not specified

    Why it's wrong here

    Omitting a deployment slot deploys to the production slot, which still runs the app; slot selection does not cause a startup failure. It tempts because slots are used for staged releases, but the stem's symptom points to the startup command, not to which slot received the ZIP.

About these practice questions

This AZ-400 question is part of Courseiva's 696-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.