nerdexam
Microsoft

AZ-204 · Question #27

Drag and Drop Question You are creating a collaborative image hosting platform as an ASP.NET MVC web application. Users add, update, and modify images on the platform. Images are stored in Azure…

The correct answer is Retrieve an image blob from the storage service. The response includes an HTTP ETag header value that identifies the current version of the image(blob).; Store the ETag of the blob for further use, and let the user make the necessary modifications to the image.; When you upload the image, include the ETag in the If-Match conditional header of the PUT BLOB request.; Check response headers. If the status code equals 200, notify that it is a success. If the code is 412m notify the user about a conflicting change. Optimistic concurrency in Azure Blob Storage uses ETags to detect conflicting changes without locking resources. The correct sequence is: (1) Retrieve the blob to get its ETag from the response headers, (2) Store the ETag and let the user modify the image, (3) When uploading…

Submitted by kavita_s· Mar 30, 2026Develop for Azure Storage - Implement blob storage operations including concurrency control strategies using ETags and conditional HTTP headers (AZ-204 / Azure Developer Associate)

Question

Drag and Drop Question You are creating a collaborative image hosting platform as an ASP.NET MVC web application. Users add, update, and modify images on the platform. Images are stored in Azure Blob storage. More than one user at a time must be able to modify the same image. You need to implement optimistic concurrency for uploading images. Which four actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order. NOTE: Each correct solution is worth one point. Answer:

Exhibit

AZ-204 question #27 exhibit

Answer Area

Drag items

Retrieve an image blob from the storage service. The response includes an HTTP ETag header value that identifies the current version of the image(blob).Check response headers. If the status code equals 200, notify that it is a success. If the code is 412m notify the user about a conflicting change.When you upload the image, include the ETag in the If-None-Match conditional header of the PUT BLOB request.Store the ETag of the blob for further use, and let the user make the necessary modifications to the image.When you upload the image, include the ETag in the If-Match conditional header of the PUT BLOB request.

Correct arrangement

  • Retrieve an image blob from the storage service. The response includes an HTTP ETag header value that identifies the current version of the image(blob).
  • Store the ETag of the blob for further use, and let the user make the necessary modifications to the image.
  • When you upload the image, include the ETag in the If-Match conditional header of the PUT BLOB request.
  • Check response headers. If the status code equals 200, notify that it is a success. If the code is 412m notify the user about a conflicting change.

Explanation

Optimistic concurrency in Azure Blob Storage uses ETags to detect conflicting changes without locking resources. The correct sequence is: (1) Retrieve the blob to get its ETag from the response headers, (2) Store the ETag and let the user modify the image, (3) When uploading, include the ETag in the If-Match conditional header of the PUT BLOB request so Azure only accepts the update if the blob hasn't changed since retrieval, (4) Check the response - HTTP 200 means success, HTTP 412 (Precondition Failed) means another user modified the blob concurrently. This pattern allows multiple users to attempt edits simultaneously while preventing silent overwrites of each other's changes.

Topics

#Azure Blob Storage#Optimistic Concurrency#ETags#Conditional Headers

Community Discussion

No community discussion yet for this question.

Full AZ-204 Practice