I am doing some SPS custom coding using APIs available in WSS Object
Model.
The code involves modification of sharepoint databases, but the
moment I run the code, I am getting run time security error:
"Updates are currently disallowed on GET requests. To allow updates
on a GET, set the 'AllowUnsafeUpdates' property on SPWeb. "
Then I set the 'AllowUnsafeUpdates' of SPWeb to "true", but even
then SAME problem.
How to modify the request to POST from GET? where should I make this
change?
Here is my code:
---------------------------------------------------------
SPWeb mySite = SPControl.GetContextWeb(Context);
mySite.AllowUnsafeUpdates = true;
SPUser user = mySite.CurrentUser;
SPWebPartCollection allWepParts = mySite.GetWebPartCollection
("http://fmsudrs01.fm.intel.com/document%
20library/eSales.aspx",Microsoft.SharePoint.WebPartPages.Storage.Pers
onal);
allWepParts.DeleteAllPersonalizations(user.ID);
--------------------------------------------------------
"allWepParts.DeleteAllPersonalizations(user.ID);" is the line which
is giving the error.