Why we need a AllowUnsafeUpdates.
AllowUnsafeUpdates is a property of
- SPSite
- 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.
good post.....thanks
ReplyDelete