exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 2 question 5 discussion

Actual exam question from Microsoft's AZ-204
Question #: 5
Topic #: 2
[All AZ-204 Questions]

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You develop and deploy an Azure App Service API app to a Windows-hosted deployment slot named Development. You create additional deployment slots named Testing and Production. You enable auto swap on the Production deployment slot.
You need to ensure that scripts run and resources are available before a swap operation occurs.
Solution: Update the web.config file to include the applicationInitialization configuration element. Specify custom initialization actions to run the scripts.
Does the solution meet the goal?

  • A. No
  • B. Yes
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
GMartinez
Highly Voted 2 years, 11 months ago
Selected Answer: B
This should work: https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots#specify-custom-warm-up
upvoted 27 times
TonyMel
2 years, 1 month ago
correct, in 2023Mar24, score: 904/1000
upvoted 4 times
...
d79
2 years ago
The anwser might be right, but the question is wrong. Auto-swap needs to be set on the source slot, not the target slot (production in this question)
upvoted 3 times
...
...
Lauri_n
Highly Voted 2 years, 4 months ago
Selected Answer: A
I think the correct answer really might be A (No). It's not because of the last part about the warm-up being wrong. The incorrect part is before that: "You enable auto swap on the Production deployment slot.". The auto swap is enabled on the source slot, not the destination slot. https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots#configure-auto-swap
upvoted 8 times
AAcademy
2 years, 3 months ago
The target slot (production) is swapped with the source slot (staging). You have to warm up the staging slot with the new code and then switch it with the production slot. This way, the production slot will used the previously warmed staging slot.
upvoted 1 times
...
...
8ac3742
Most Recent 9 months ago
In order to ensure the required resources are available, you can prepare one pre-swap script to check if all required resources are available, you can call that pre-swap script in "az webapp config" or in CI/CD .yml file.
upvoted 1 times
...
pjatx
1 year, 1 month ago
Selected Answer: A
You enable auto-swap on source slot not the target slot. The enabling auto-swap on Production simply won't work with deployments to Testing slot.
upvoted 1 times
...
Isoldhe
1 year, 2 months ago
Selected Answer: A
Copilot AI: The solution you proposed does not meet the goal. Updating the web.config file to include the applicationInitialization configuration element only ensures that the app is warmed up before the swap, but it does not guarantee that the scripts run and the resources are available1. To achieve that, you need to use the slot swap operation API2 and specify a swap operation id3 that can be used to monitor the progress and status of the swap. Alternatively, you can also disable auto swap, update the app with a method named statuscheck to run the scripts, re-enable auto swap and deploy the app to the Production slot4.
upvoted 1 times
...
manopeydakon
1 year, 3 months ago
If answer B is correct then the question lacks some info about "warm up" part and if that part exists on the actual question on exam go with B otherwise it is correct with A.
upvoted 2 times
...
CarlosTheBoldest
1 year, 4 months ago
I got this question on my exam, 2023Dec, go with I remember was the most voted answer. Score 902, most of the questions were here, slightly different on wording because the Azure Ad <-> Entra Id change. Case was City Power & Light. Good luck!
upvoted 5 times
...
shekhar11
1 year, 7 months ago
On my exam in sept23 2023
upvoted 1 times
Aneeqa
1 year, 7 months ago
what is the correct ans?
upvoted 1 times
...
...
Tarajee
1 year, 7 months ago
On my exam in 2023 sept10
upvoted 2 times
...
longnguyendh
1 year, 9 months ago
It should be yes. Keyword is applicationInitialization
upvoted 2 times
...
deathRac3
1 year, 11 months ago
Selected Answer: B
sequence was wrong
upvoted 1 times
...
p2006
2 years ago
Selected Answer: B
https://learn.microsoft.com/en-us/answers/questions/980267/what-do-we-need-to-warmup-before-swapping-apps-ser
upvoted 1 times
...
Priya0703
2 years, 2 months ago
Got this question series on 20-02-2023 exam.
upvoted 3 times
...
Poops
2 years, 4 months ago
Selected Answer: B
Should be B (Yes), that's the way to implement warmup according to MS: https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots#specify-custom-warm-up
upvoted 3 times
...
gds03
2 years, 8 months ago
You need to ensure that scripts run and resources are available before a swap operation occurs. App Initialization has nothing to do with have sure that resources are available.
upvoted 2 times
...
rohitpatil113
2 years, 8 months ago
Selected Answer: A
https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots#Auto-Swap
upvoted 2 times
...
d_vaibhav
2 years, 8 months ago
Correct answer must be B (applicationinitialization tag is way of implementing custom warm-up)
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago