Can I update the properties of a RowKey or PartitionKey object in an Azure table store?
I thought, yes, or maybe just PartitionKey, but now I'm trying to do this (try changing the RowKey or PartitionKey) and get an error:
The remote server returned an error: (404) Not Found. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.WebException: The remote server returned an error: (404) Not Found. Source Error: Line 143: Line 144: var updateOperation = TableOperation.Replace(entity); Line 145: _table.Execute(updateOperation); Line 146: } Line 147: }
My code for updating an object (short version):
var query = new TableQuery<CalculatorAccessTokenEntity>() .Where(TableQuery.GenerateFilterCondition("AccessUrl", QueryComparisons.Equal, url)); var newToken = GetUniqueKey(5);//get some random string of length 5 entity.PartitionKey = newToken; // Try to use Merge here also but unsuccessful var updateOperation = TableOperation.Replace(entity); _table.Execute(updateOperation);
user3770925
source share