Chapter 1 · AZ-204: Developing Solutions for Microsoft Azure Develop Azure Compute Solutions

Azure App Service Web Apps

20 practice questions · 5 marks weightage

Practice questions

  1. Question 1Q-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.
    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.
    See the answer and solution
  2. Question 2Q-EA14DF

    A team wants to release a new version of an Azure App Service web app with minimal production downtime. The team has a staging slot and a production slot. Which deployment process best meets the requirement?

    1. A.Deploy the new version directly to the production slot and restart the web app.
    2. B.Deploy the new version to the staging slot, test it, and then swap the staging slot with the production slot.
    3. C.Scale the production App Service plan down before deploying to the staging slot.
    4. D.Create a new App Service plan and manually copy the production files to it without using slots.
    See the answer and solution
  3. Question 3Q-D70B95

    An ASP.NET Core web app hosted in Azure App Service must access a database password without storing the password in source code or in a deployment package. The password is stored as a secret in Azure Key Vault. The web app uses a system-assigned managed identity. Which configuration should you use?

    1. A.Add the plaintext password as an App Service application setting and disable managed identity.
    2. B.Add an application setting with a value such as @Microsoft.KeyVault(SecretUri=https://myvault.vault.azure.net/secrets/DbPassword/) and grant the web app identity permission to read Key Vault secrets.
    3. C.Add the Key Vault administrator username and password as application settings, then have the application call Key Vault.
    4. D.Place the secret in the web app's wwwroot directory and restrict access using an App Service access restriction.
    See the answer and solution
  4. Question 4Q-E90EB8

    A company hosts an ASP.NET Core web app in Azure App Service. The company requires every request sent over HTTP to be redirected automatically to HTTPS. Which App Service setting should be enabled?

    1. A.ARR Affinity
    2. B.Always On
    3. C.HTTPS Only
    4. D.WebSockets
    See the answer and solution
  5. Question 5Q-1B5B45

    An Azure App Service web app must make outbound calls to a private REST API hosted inside an Azure virtual network. The web app must remain publicly accessible from the internet. Which feature should you configure?

    1. A.An App Service private endpoint
    2. B.Regional VNet integration
    3. C.An Azure Storage service endpoint
    4. D.An App Service access restriction rule
    See the answer and solution

15 more questions on Azure App Service Web Apps

Sign up free to practise the full chapter. Questions you get wrong come back until you've mastered them.

Start practising free

Free to start · No credit card needed