Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

SPS Security error - can't modify database

  Asked By: Rusty    Date: Sep 17    Category: Sharepoint    Views: 854

I am doing some SPS custom coding using APIs available in WSS Object

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

Here is my code:
SPWeb mySite = SPControl.GetContextWeb(Context);
mySite.AllowUnsafeUpdates = true;

SPUser user = mySite.CurrentUser;

SPWebPartCollection allWepParts = mySite.GetWebPartCollection


"allWepParts.DeleteAllPersonalizations(user.ID);" is the line which
is giving the error.



1 Answer Found

Answer #1    Answered By: Satyajit Kabadagi     Answered On: Sep 17

I can't help you with your specific problem, but I may
be able to help you otherwise.

I'm reperesenting a client who needs a sharepoint
V.2003 experienced person for a job paying up to $100K
in the Baltimore, MD area.

Didn't find what you were looking for? Find more on SPS Security error - can't modify database Or get search suggestion and latest updates.