nerdexam
MicrosoftMicrosoft

AZ-204 · Question #178

AZ-204 Question #178: Real Exam Question with Answer & Explanation

The correct answer is C: blobClient.DefaultRequestOptions.LocationMode = LocationMode.PrimaryThenSecondary;. You should configure the blob client default request option for the location mode as PrimaryThenSecondary. In this mode, in case of a regional outage affecting primary storage, the application reads the images replicated to another region as a fallback until primary storage is av

Submitted by hans_de· Mar 30, 2026

Question

You are developing a .Net Core application that manages images for an advertising company. The images are stored in blob storage with read access geo-zone-redundant storage (RA-GZRS) redundancy to achieve high availability and maximum durability. In case of regional outage, the application should be able to read data from secondary storage replication. Secondary storage replication should only be used if primary storage is unavailable. You develop the following code to create the object responsible for uploading and reading images from blob storage: string storageConnectionString = Environment.GetEnvironmentVariable("storageconnectionstring"); CloudStorageAccount storageAccount = CloudStorageAccount.Parse(storageConnectionString); blobClient = storageAccount.CreateCloudBlobClient(); You need to configure the blob client to meet the high availability requirement. Which location mode option should you use?

Options

  • AblobClient.DefaultRequestOptions.LocationMode = LocationMode.SecondaryOnly;
  • BblobClient.DefaultRequestOptions.LocationMode = LocationMode.SecondaryThenPrimary;
  • CblobClient.DefaultRequestOptions.LocationMode = LocationMode.PrimaryThenSecondary;
  • DblobClient.DefaultRequestOptions.LocationMode = LocationMode.PrimaryOnly;

Explanation

You should configure the blob client default request option for the location mode as PrimaryThenSecondary. In this mode, in case of a regional outage affecting primary storage, the application reads the images replicated to another region as a fallback until primary storage is available again. You should not configure the blob client default request option for the location mode as PrimaryOnly. In this mode, only primary storage is used. In case of a regional outage affecting primary storage, the application will fail to read images even if they are replicated to secondary storage. This is the default blob client mode. You should not configure the blob client default request option for the location mode as SecondaryOnly or SecondaryThenPrimary. With these modes, the blob client will first read the images from secondary storage. Secondary storage should only be used if primary storage is

Community Discussion

No community discussion yet for this question.

Full AZ-204 PracticeBrowse All AZ-204 Questions