SharePoint: The security validation for this page is invalid

Another day, another lesson. This time I struggled with the following error: “The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.” This error occurs when you are on a custom form and try to save list item. I am sure that one can find many more scenarios where this error occurs. As usual, log contains error but not information.


NB! This blog is moved to

Click here to go to article


  • You are the man. This worked quite well. I appreciate the information.

  • Thank you very much ..
    It worked quite well. Very good info, thanks again for sharing.. keep it up.

  • Hi,

    I have faced the same problem and setting the allowunsafeupdate true the error message gone away. the error was thrown when an update operation is done with wcf service (deployed in sharepoint).

  • Make sure you are instantiating a new web from an SPWeb object itself and not SPWeb.Webs["WebName"].Add since this will fail. You will need to have full SPWeb context and maybe need to set AllowUnsafeUpdates on the SPWeb and SPSite as well as manipulating the form digest settings.

Comments have been disabled for this content.