New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Microsoft AZ-204 Exam - Topic 3 Question 24 Discussion

Actual exam question for Microsoft's AZ-204 exam
Question #: 24
Topic #: 3
[All AZ-204 Questions]

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.

Show Suggested Answer Hide Answer
Suggested Answer: A, D

A: To customize your deployment, include a .deployment file in the repository root.

You just need to add a file to the root of your repository with the name .deployment and the content:

[config]

command = YOUR COMMAND TO RUN FOR DEPLOYMENT

this command can be just running a script (batch file) that has all that is required for your deployment, like copying files from the repository to the web root directory for example.

D: In Azure, you can run your functions directly from a deployment package file in your function app. The other option is to deploy your files in the d:homesitewwwroot directory of your function app (see A above).

To enable your function app to run from a package, you just add a WEBSITE_RUN_FROM_PACKAGE setting to your function app settings.

Note: The host.json metadata file contains global configuration options that affect all functions for a function app.

References:

https://github.com/projectkudu/kudu/wiki/Custom-Deployment-Script

https://docs.microsoft.com/bs-latn-ba/azure/azure-functions/run-functions-from-deployment-package


Contribute your Thoughts:

0/2000 characters
Mila
4 months ago
D seems like a stretch, not sure about that one.
upvoted 0 times
...
Leota
4 months ago
C sounds a bit off to me, not sure it would work.
upvoted 0 times
...
Selma
4 months ago
Wait, can you really use a .deployment file for this?
upvoted 0 times
...
Harrison
5 months ago
I think B is the better choice here.
upvoted 0 times
...
Krystal
5 months ago
A is definitely a valid option!
upvoted 0 times
...
Stefany
5 months ago
I don’t think the WEBSITE_RUN_FROM_PACKAGE setting is the right approach for this scenario. It seems more related to deployment packaging than running scripts.
upvoted 0 times
...
Leatha
5 months ago
I’m a bit confused about the run.cmd option. I feel like I’ve seen that mentioned, but I can’t recall the specifics on how it works with Azure.
upvoted 0 times
...
Barrie
5 months ago
I think adding a PreBuild target in the csproj file sounds familiar. We practiced that in a similar question about build processes.
upvoted 0 times
...
Buck
5 months ago
I remember something about using a .deployment file to run scripts during deployment, but I'm not entirely sure if that's the only way to do it.
upvoted 0 times
...
Raina
5 months ago
I've worked with Salesforce Community Cloud before, so I think I've got a good handle on this. The two requirements are SAML SSO and Registration Handler.
upvoted 0 times
...
Cathern
5 months ago
Hmm, I'm not sure if that's the right approach. Maybe we should start by creating a subscription to set up the overall Azure environment first.
upvoted 0 times
...
Kristian
5 months ago
Hmm, I'm a bit unsure about this one. The question mentions breaking down the work into activities and tasks, so I'm wondering if that points to a bottom-up approach. But I'll need to think it through more carefully.
upvoted 0 times
...

Save Cancel