Developing Solutions for Microsoft Azure (legacy) — Question 17

You are preparing to deploy an ASP.NET Core website to an Azure Web App from a GitHub repository. The website includes static content generated by a script.
You plan to use the Azure Web App continuous deployment feature.
You need to run the static generation script before the website starts serving traffic.
What are two possible ways to achieve this goal? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.

Answer options

Correct answer: A, D

Explanation

Option A is correct because the .deployment file allows you to specify a command to run before the deployment process, which can include generating static content. Option D is also correct as the WEBSITE_RUN_FROM_PACKAGE setting can be used to define a path for the static content generation tool to run before the app serves traffic. Options B and C do not align with the Azure Web App deployment process for running scripts prior to serving traffic.