论证' UploadParallelActiveTasks'大于' 64'

时间:2014-03-29 07:10:06

标签: azure blob

当我尝试将大文件上传到Azure blob存储时,似乎发生了上述错误。

这是我在声明CloudBlobClient时所拥有的。

CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
blobClient.ParallelOperationThreadCount = 1;
blobClient.SingleBlobUploadThresholdInBytes = 67108864;
CloudBlobContainer container = blobClient.GetContainerReference("container");
await container.CreateIfNotExistsAsync();
CloudBlockBlob blob = container.GetBlockBlobReference(blobName);
await blob.UploadFromByteArrayAsync(fileByte, 0, fileByte.Count());

但是,为什么当我已经将ParallelOperationThreadCount设置为1并且发生此异常时呢?

编辑:在下面添加了堆栈跟踪。

The argument 'UploadParallelActiveTasks' is larger than maximum of '64'  Parameter name: UploadParallelActiveTasks<InnerException><trace source>
   at Microsoft.WindowsAzure.Storage.Core.Util.CommonUtility.AssertInBounds[T](String paramName, T val, T min, T max)
   at Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient.set_ParallelOperationThreadCount(Int32 value)
   at App1.App.<uploadImageToBlobStorage>d__3b.MoveNext()
--- 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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at App1.WallpaperPage.<>c__DisplayClass3.<<btnAcceptPreview_Click>b__1>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__0(Object state)

0 个答案:

没有答案