exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 2 question 33 discussion

Actual exam question from Microsoft's AZ-204
Question #: 33
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 app with a method named statuscheck to run the scripts. Update the app settings for the app. Set the
WEBSITE_SWAP_WARMUP_PING_PATH and WEBSITE_SWAP_WARMUP_PING_STATUSES with a path to the new method and appropriate response codes.
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
Carlous
Highly Voted 3 years, 8 months ago
Should be YES? https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots You can also customize the warm-up behavior with one or both of the following app settings: WEBSITE_SWAP_WARMUP_PING_PATH: The path to ping to warm up your site. Add this app setting by specifying a custom path that begins with a slash as the value. An example is /statuscheck. The default value is /. WEBSITE_SWAP_WARMUP_PING_STATUSES: Valid HTTP response codes for the warm-up operation. Add this app setting with a comma-separated list of HTTP codes. An example is 200,202 . If the returned status code isn't in the list, the warmup and swap operations are stopped. By default, all response codes are valid. WEBSITE_WARMUP_PATH: A relative path on the site that should be pinged whenever the site restarts (not only during slot swaps). Example values include /statuscheck or the root path, /.
upvoted 85 times
Tom87
3 years, 8 months ago
I agree. For ASP.NET and ASP.NET Core developers, setting app settings in App Service are like setting them in <appSettings> in Web.config or appsettings.json, but the values in App Service override the ones in Web.config or appsettings.json. https://docs.microsoft.com/en-us/azure/app-service/configure-common#configure-app-settings
upvoted 5 times
...
warchoon
1 year, 9 months ago
NO. Auto swap should be on the source
upvoted 5 times
...
altafpatel1984
3 years ago
Question is not only for warm-up but also to execute custom script. So Answer No is correct.
upvoted 11 times
mcanic
2 years, 11 months ago
it states that a new method called statuscheck is added to the application that executes these scripts. if you add the path to /statuscheck in WEBSITE_SWAP_WARMUP_PING_PATH the application executes the scripts
upvoted 10 times
...
...
Santileo
3 years, 8 months ago
This guy is right. Better url: https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots#specify-custom-warm-up
upvoted 6 times
Percy2112
3 years, 5 months ago
I Agree.
upvoted 3 times
...
...
...
simonverma
Highly Voted 3 years, 8 months ago
The answer is right to be marked as 'No' as the warm up is done correctly but the web config part is not mentioned i.e, AppInitialization.
upvoted 23 times
lugospod
2 years, 11 months ago
you dont need appinit tif you set WEBSITE_SWAP_WARMUP_PING_PATH and response... it is an alternate method to achieve the same thing.
upvoted 6 times
...
...
HariB1992
Most Recent 7 months, 2 weeks ago
Selected Answer: B
Yes, the solution meets the goal!
upvoted 3 times
...
Isoldhe
9 months, 2 weeks ago
Selected Answer: B
Copilot AI says No: The solution does not meet the goal. Updating the app with a method named statuscheck to run the scripts and setting the WEBSITE_SWAP_WARMUP_PING_PATH and WEBSITE_SWAP_WARMUP_PING_STATUSES app settings are not sufficient to ensure that scripts run and resources are available before a swap operation occurs. These settings are used to configure the health check for the swap operation, which determines whether the source slot is ready to be swapped with the target slot. However, the health check does not guarantee that the scripts run and resources are available, as it only verifies that the app responds to HTTP requests with the expected status codes.
upvoted 3 times
...
Jass1nonly
9 months, 3 weeks ago
Quote "You need to ensure that scripts run and resources are available before a swap operation occurs." Note from Microsoft "The <applicationInitialization> configuration element is part of each app start-up, whereas the two warm-up behavior app settings apply only to slot swaps." conclusion: for this case where swap is concerned, The proposed solution in the question with appsettings WEBSITE_SWAP_WARMUP_PING_PATH and WEBSITE_SWAP_WARMUP_PING_STATUSES is correct. Hence answer B. Yes.
upvoted 1 times
...
AhmedAbdelAziz
10 months, 1 week ago
Selected Answer: B
Should be YES The <applicationInitialization> configuration element is part of each app start-up, whereas the two warm-up behavior app settings apply only to slot swaps. WEBSITE_SWAP_WARMUP_PING_PATH: The path to ping over HTTP to warm up your site. Add this app setting by specifying a custom path that begins with a slash as the value. An example is /statuscheck. The default value is /. WEBSITE_SWAP_WARMUP_PING_STATUSES: Valid HTTP response codes for the warm-up operation. Add this app setting with a comma-separated list of HTTP codes. An example is 200,202 . If the returned status code isn't in the list, the warmup and swap operations are stopped. By default, all response codes are valid.
upvoted 1 times
...
Nihilist11
10 months, 3 weeks ago
Jan-21-2024 - This was in my exam, went with YES - Score 740 Contosso case study [Couldnt find here]
upvoted 4 times
paraballa
10 months, 1 week ago
How many questions were there that came from ExamTopics?
upvoted 1 times
...
...
Tarajee
1 year, 2 months ago
Got this on 2023sept
upvoted 1 times
...
mihailos
1 year, 3 months ago
Got it in exam 28/08/23. Went with YES for this. Scored 912
upvoted 4 times
yawxir
1 year, 3 months ago
Hey, Glad you pass. Can you guide more on exam pattern as this should be open book now ?
upvoted 3 times
...
...
JH81
1 year, 5 months ago
Selected Answer: A
Answer is NO. While this solution may work put on your MS thinking hat because modifications to the app should not be necessary when there are other ways to get this to work with no app modifications.
upvoted 1 times
...
red0400
1 year, 8 months ago
Selected Answer: B
Answer is YES
upvoted 1 times
...
uffuchsi
1 year, 9 months ago
Surely it's yes? You can customize the warm-up behavior with one or both of the following app settings: WEBSITE_SWAP_WARMUP_PING_PATH: The path to ping to warm up your site. Add this app setting by specifying a custom path that begins with a slash as the value. An example is /statuscheck. The default value is /. WEBSITE_SWAP_WARMUP_PING_STATUSES: Valid HTTP response codes for the warm-up operation. Add this app setting with a comma-separated list of HTTP codes. An example is 200,202 . If the returned status code isn't in the list, the warmup and swap operations are stopped. By default, all response codes are valid. WEBSITE_WARMUP_PATH: A relative path on the site that should be pinged whenever the site restarts (not only during slot swaps). Example values include /statuscheck or the root path, /. https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots#specify-custom-warm-up
upvoted 1 times
...
rgullini
1 year, 11 months ago
Selected Answer: B
The solution doesn´t include the scripts. Answer is NO.
upvoted 1 times
...
Lucifer14
1 year, 11 months ago
In 28-12-2022 exam
upvoted 1 times
...
memooo
1 year, 11 months ago
Selected Answer: B
Correct answer is B: Reference: https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots#specify-custom-warm-up
upvoted 1 times
...
mdg3501
2 years ago
got this on 2022-12-7
upvoted 1 times
...
nvtienanh
2 years ago
Got this question on 2-Dec-2022 exam. Went with most voted
upvoted 3 times
uditrm12
1 year, 11 months ago
examtopics questions are enough to pass?
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 ...