Special characters not allowed as a value of Partition Key and Row Key


What is wrong with the Partition Key value?

If you are trying to insert a Partition Key and Row Key value like in the below image then very likely you will encounter a DataServiceRequestException.

PartitionKey = "A/1"
PartitionKey = "A#1"
PartitionKey = "A?1"

You cannot have the below special characters as a value of Partition Key and Row Key.

special characters

Let us say you have a table called School and you are trying to insert an entity in that table using the below code.

partition key

You are adding an entity as below,

row key

When you run to add an entity you will get an exception like below,

partition key and row key

In above code if you notice Partition Key Value is

PartitionKey = "A?1"

So while adding an entity makes sure you are not using the four special characters in the value of Row Key and Partition Key. I hope this post is useful. Thanks for reading
  

Up Next
    Ebook Download
    View all
    Learn
    View all