我有一个应用程序使用以下方法并行上传CloudBlockBlob
UploadFromStreamAsync MSDN Documentation
CloudBlockBlob.UploadFromStreamAsync Method (Stream, AccessCondition, BlobRequestOptions, OperationContext)
有时我发现文件上传由于下面提到的异常而出错。
Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (400) Bad Request. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
at Microsoft.WindowsAzure.Storage.Shared.Protocol.HttpResponseParsers.ProcessExpectedStatusCodeNoException[T](HttpStatusCode expectedStatusCode, HttpStatusCode actualStatusCode, T retVal, StorageCommandBase`1 cmd, Exception ex)
at Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob.<PutBlockListImpl>b__33(RESTCommand`1 cmd, HttpWebResponse resp, Exception ex, OperationContext ctx)
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndGetResponse[T](IAsyncResult getResponseResult)
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.Storage.Core.Util.StorageAsyncResult`1.End()
at Microsoft.WindowsAzure.Storage.Core.Util.AsyncExtensions.<>c__DisplayClass4.<CreateCallbackVoid>b__3(IAsyncResult ar)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at WKHMR.SSR.Common.Azure.Storage.AzureBlobStorage.<UploadFileAsync>d__32.MoveNext()
StatusMessage:The specified block list is invalid.
ErrorCode:InvalidBlockList
任何人都知道可能导致此错误的原因是什么?以及如何解决它?