'The remote server returned an error: (409) Conflict

When we are dealing with Azure Storage Table data insert, we may get this kind of error.

This is due to when we are trying to insert a duplicate key inside a Azure Table Storage.

duplicate key= PartitionKey+RowKey

Ex: PartitionKey="1001"
       RowKey="John"

here once we insert the above data into Azure Table, and again if we are trying to insert same combination then we will get "The remote server returned an error: (409) Conflict" error.

How to resolve it:
    In this case we need to go with either of below methods as per your requirement.


  1. TableOperation.InsertOrReplace(tableObject)
  2. TableOperation.InsertOrMerge(tableObject)   

Comments

Popular posts from this blog

Connecting Dynamics 365 Web api using external HTML page

Get azure blob files inside Sub Directories

Interview questions on MS CRM