C# 来自CloudTable.ExecuteBatch(..)的意外响应代码

C# 来自CloudTable.ExecuteBatch(..)的意外响应代码,c#,azure,azure-storage,azure-table-storage,C#,Azure,Azure Storage,Azure Table Storage,当尝试批量插入Azure表存储时,我在CloudTable.ExecuteBatch()上收到StorageException: 引发异常: Microsoft.WindowsAzure.Storage.StorageException:意外响应 操作代码:6 at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](StorageCommandBase1 cmd、IRetryPolicy策略、Operatio

当尝试批量插入Azure表存储时,我在
CloudTable.ExecuteBatch()上收到
StorageException

引发异常:

Microsoft.WindowsAzure.Storage.StorageException:意外响应 操作代码:6 at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](StorageCommandBase1 cmd、IRetryPolicy策略、OperationContext(操作上下文)中的 e:\projects\azure sdk for net\microsoft azure api\Services\Storage\Lib\DotNetCommon\Core\Executor\Executor.cs:line 737 at Microsoft.WindowsAzure.Storage.Table.TableBatchOperation.Execute(CloudTableClient 客户端、字符串tableName、TableRequestOptions、requestOptions、, OperationContext(操作上下文)位于 e:\projects\azure sdk for net\microsoft azure api\Services\Storage\Lib\DotNetCommon\Table\TableBatchOperation.cs:line 85分 Microsoft.WindowsAzure.Storage.Table.CloudTable.ExecuteBatch(TableBatchOperation 批处理、TableRequestOptions、requestOptions、OperationContext 操作上下文)在 e:\projects\azure sdk for net\microsoft azure api\Services\Storage\Lib\DotNetCommon\Table\CloudTable.cs:line 165 at Library.Modules.Cloud.TableStorage.StorageTableRepository
1.insertoreplacebatch(List
1 (实体)

通常使用
TableOperation
插入这些实体不会给我带来任何问题


我在互联网上或MSDN参考资料中找不到此异常

这是由于重复的
RowKey
值造成的。即使使用
TableBatchOperation.InsertOrReplace(entities)
,行键仍然需要唯一


操作的意外响应代码:6
指的是列表中的第6个元素。在我看来,Azure SDK中的错误代码非常具有误导性。

能否检查批处理中的所有实体1)是否具有相同的PartitionKey,2)一个实体在批处理中没有重复多次。根据错误消息,查看批次中的第7个实体。该实体正在引发问题。错误代码确实具有误导性。我整理了一份工作。使用它来查找有意义的错误信息。就我而言,我发送的数据太大了。@AmadeuszWieczorek可以证实。链接断开了。我的博客引擎出了问题,现在已经修复了。谢谢你提醒我!链接现在可以工作了。
TableBatchOperation batchOperation = new TableBatchOperation();

foreach (var entity in entities)
{
    batchOperation.InsertOrReplace(entity);
}

table.ExecuteBatch(batchOperation);