Search This Blog

Wednesday, December 17, 2014

Why we need a AllowUnsafeUpdates.

AllowUnsafeUpdates is a property of

  1. SPSite
  2. SPWeb
If user do't have any permission to update the data. So we run the code with special permission for that we use RunWithElevatedPrivileges block, by using this code user update the item on the behalf of system account, for that we need to Set AllowUnsafeUpdates   to true to disable security validation on Update().This is request if persisting anything within RunWithElevatedPrivileges.Any exception, handled or otherwise, sets AllowUnsafeUpdates to False.

No comments:

Post a Comment