Error receiving error (400): The specified block list is invalid. 'when loading text in Azure Blob storage

I executed the following code to load text into an Azure block block:

CloudStorageAccount storageAccount = ... CloudBlobClient blobClient = ... CloudBlobContainer container = container.CreateIfNotExists(); CloudBlockBlob blockBlob = container.GetBlockBlobReference("myblob"); blockBlob.UploadText(blob); 

Periodically, I get the following exception from the UploadText () operation:

The remote server returned an error: (400) Bad request. in System.Net.HttpWebRequest.GetResponse () ... RequestID: 27e93ddb-0001-0011-2113-0966db002000 RequestDate: Sat, Oct 17. 2015 19:38:47 GMT StatusMessage: the specified block list is invalid. ErrorCode: InvalidBlockList

I understand the importance of sending a properly ordered list of block identifiers and matching block identifier lengths when loading a blob, but assuming UploadText hides this data, I would not assume that a block list problem could occur if there was no frame error. Obviously, under the covers, UploadText () calls the REST API and deals with blocks, but again, that is all hidden.

The text that I download is from 1 KB to 15 MB and is encoded in UTF-8 encoding.

+5
source share

Source: https://habr.com/ru/post/1234071/


All Articles