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.


Comments

Post a Comment

Popular posts from this blog

SharePoint RPC Protocols Examples Using OWSSVR.DLL

Send Email using SharePoint Rest API

Query suggestions in SP 2013 Using Rest API (/_api/search/suggest)