Thursday, November 3, 2011

sharepoint {0} cannot be imported because its parent {1} does not exist

I was using the SPImport and SPExport classes.  Kept getting issues.

Tried security...
then set site lock, I had set it on hoping for a performance increase, 100GB web with 5 libraries!!!!

Re-exported ...
set off site lock  Stdadm –o setsitelock –url http://yoursite –lock none

Still no luck, opened export file with winrar, edited manifest.  Looking for clues.

The folder that would hold URL '/sites/1/CZ/1-40GBWE' does not exist on the server.

and then ReParent in the SPImport.

        static void spImport_Started(object sender, SPDeploymentEventArgs e)
            SPImportObjectCollection rootObjects = e.RootObjects;

            foreach (SPImportObject io in rootObjects)
                io.TargetParentUrl = @"";

Now its fine

No comments: