Hi,
I tried importing a subsite using SPImport class and it is working fine in Console Appplication. When I tried implementing it as a WCF service/run it from a Web Application it fails . Following error is thrown on exceuting the Run() method of SPImport object.
Please find the following error below:
Microsoft.SharePoint.SPException: Updates are currently disallowed on GET requests. To allow updates on a GET, set the 'AllowUnsafeUpdates' property on SPWeb. ---> System.Runtime.InteropServices.COMException:
Updates are currently disallowed on GET requests. To allow updates on a GET, set the 'AllowUnsafeUpdates' property on SPWeb.\u000d\u000a at Microsoft.SharePoint.Library.SPRequestInternalClass.CreateWeb(String bstrUrl, String bstrTitle, String
bstrDescription, UInt32 nLCID, String bstrWebTemplate, Boolean bCreateUniqueWeb, Boolean bConvertIfThere, Guid& pgWebId, Guid& pgRootFolderId, Boolean bCreateSystemCatalogs)
I tried setting AllowUnsafeUpdates to true of SPSite and SPWeb object, and running the code using RunWithElevatedPrivileges, but still in vain.
Kindly help.
Regards,
Priya