My application reads blob content from Azure blob storage. The Blob content file is being changed by another program at the same time while it is being read. I get error in the Read() line. Which I believe is because of mismatch eTag values as file is both read and written at the same time.
How can I make my application ignore checking for ETag value (Which is disabling concurrency check). Tried as below. But same error.
BlobRequestConditions blobRequestConditions = new BlobRequestConditions
{
IfMatch = new ETag("*")
//IfMatch = ETag.All
};
using (var stream = await blob.OpenReadAsync(offset, sgmtSize, blobRequestConditions))
{
stream.Read(); // ERROR in this line
}
Read() error below:
Azure.RequestFailedException: The condition specified using HTTP conditional header(s) is not met.
RequestId:0000000
Time:2022-05-16T10:37:49.1672314Z
Status: 412 (The condition specified using HTTP conditional header(s) is not met.)
ErrorCode: ConditionNotMet