Microsoft Azure Cloud Integration Engineering

(Compute, Cache, Storage, ACS, Service Bus, WebSites, VMs, SQL Azure, Data Sync, Import Export)

Microsoft.WindowsAzure.Storage.StorageException: Unexpected response code for operation ....

Microsoft.WindowsAzure.Storage.StorageException: Unexpected response code for operation ....

Rate This
  • Comments 1

At times you would get errors such as below while executing batch transactions on a table in table storage

 Microsoft.WindowsAzure.Storage.StorageException: Unexpected response code for operation : 5
    at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](StorageCommandBase`1 cmd, IRetryPolicy policy, OperationContext operationContext)
    at Microsoft.WindowsAzure.Storage.Table.CloudTable.ExecuteBatch(TableBatchOperation batch, TableRequestOptions requestOptions, OperationContext operationContext)
    at Worker.Processors.QueueOneProcessor.FlushCache()
 Request Information
 RequestID:fe0a42c7-faeb-4fd7-a9f8-690bc12e1f41
 RequestDate:Tue, 21 May 2013 13:48:55 GMT
 StatusMessage:Accepted
 ErrorCode:OutOfRangeInput

One of the most common reason of such failure is malformed parameters passed in the query such as using disallowed characters in partitionkey or rowkey. The reason for the error above is that partitionkey contained a disallowed character "?".  Refer to http://msdn.microsoft.com/en-us/library/dd179338.aspx  which specifies below

 

 Characters Disallowed in Key Fields
The following characters are not allowed in values for the PartitionKey and RowKey properties:

 • The forward slash (/) character
 • The backslash (\) character
 • The number sign (#) character
 • The question mark (?) character

If you are getting the aforementioned error then please check if the partitionkey or rowkey being passed contains a disallowed character and rectify it.

Comments
  • wish the exception was better. eg "the character '/' is not allowed in a rowkey"

Page 1 of 1 (1 items)
Leave a Comment
  • Please add 6 and 7 and type the answer here:
  • Post