Azure App Service Web Apps · AZ-204: Developing Solutions for Microsoft Azure Develop Azure Compute Solutions

A web app has production and staging deployment slots. Each slot must use a different API endpoint, and the endpoint must remain associated with its…

Practice question from Azure App Service Web Apps (AZ-204: Developing Solutions for Microsoft Azure Develop Azure Compute Solutions), with the correct answer and a step-by-step solution.

easy · MCQ · Q-A2E2A1

A web app has production and staging deployment slots. Each slot must use a different API endpoint, and the endpoint must remain associated with its slot when a swap occurs. What should you do?

  1. A.Hard-code the endpoint in the application source code for each slot.
  2. B.Store the endpoint in an App Service application setting and mark the setting as a deployment slot setting.Correct answer
  3. C.Store the endpoint in the deployment package filename.
  4. D.Store the endpoint in an Azure Storage account and change the storage account during every swap.

Solution

Application settings are exposed to the web app as environment variables. Marking the setting as a deployment slot setting makes it sticky, so its value remains with the slot instead of moving during a swap.

More from Azure App Service Web Apps

All of Azure App Service Web Apps

Practise more Develop Azure Compute Solutions

Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.

Start practising free

Free to start · No credit card needed