Monday, June 14, 2010

The security validation for this page is invalid - resolution

Whenever you are having your code trying to manipulate files in document libraries and they have to work in different identities, you most properly will have your "Allowunsafeupdates=true" line added in your code. This works most times, but at certain scenarios, it might throw up the below error (at the time when the code is trying to move a document from one library in one site to another library in another site). The same code however would have worked for the Admin login.


The resolution for this is not in the code unfortunately! All you need to do is go to your Central Administration -> Application Management -> Web Application general Settings and turn off the "Security Validation"

Bingo, your code for all users starts working fine!

No comments:

Post a Comment