I was working on a WCF web service that is hosted by SharePoint 2010 that provisions a users My Site and I kept getting this error message when trying to run the service:

Updates are currently disallowed on GET requests. To allow updates on a GET, 
set the 'AllowUnsafeUpdates' property on SPWeb.

In searching the issue, I found a workaround on the MSDN forums that works quite well: set the current HttpContext to null. When the current HttpContext is null, SharePoint does not know that the request was made during a GET request.

I found this extremely helpful and wanted to share.

Pin It on Pinterest

Share This
%d bloggers like this: