I have a web page with a partial view. The partial view contains buttons to update the items. Normally updating works fine. i.e. when the partial view is initially loaded as part of the page creation.
However I am now using AJAX to update the partial view. When I then click on the Ajax generated button within the partial view and try to update the item I get the error: The anti-forgery token could not be decrypted...
Looking at the data being sent, I noticed that the initially rendered buttons are sending a Set-Cookie header. and the updated AJAX generated buttons are not.
Looking at the generated HTML everything looks identical. But clearly the AJAX generated content is being treated differently to when it's pre-rendered