Request a Quote

Moss 2007 to Sharepoint2013 page migration

Moss 2007 to Sharepoint2013 page migration

Moss 2007 to Sharepoint2013 page migration

Few months ago, I had arequirement of copy SharePoint 2007 pages to SharePoint 2013 site in my migration project. The web application was hosted on other server (not on the SharePoint server). So Ihad to use SharePoint services model.I have used copy-service for this requirement. Please note that this service will only copy static content of page not other webparts content.

To start the page migration, first fetch source page fieldinfo and bytearray using copy-service ‘GetItem’ method(add copy service reference and programatically change its url).

 //give source copy-service url and credentials
CopyWS.Copy copyWS = new CopyWS.Copy();
copyWS.Url = “http://wssdev:7001/_vti_bin/copy.asmx”;
copyWS.Credentials = new NetworkCredential(“sourcesite-username”, “sourcesite-password”);//fetch page fieldinfo and bytearray using copy GetItem method from source page.
CopyWS.FieldInformation[] mossPageFieldInfoArray;
byte[] mossPageByteArray;
uint myGetUint = copyWS.GetItem(“http://wssdev:7001/Pages/test1.aspx”, out mossPageFieldInfoArray, out mossPageByteArray);

Next, set copy-service url to destination site and copy the page using ‘CopyIntoItems’ method. Provide source page fieldinfo and bytearray into this method.

//give destination copy-service url and credentials
copyWS = new CopyWS.Copy();
copyWS.Url = “http://spe2013dev1:4444/_vti_bin/copy.asmx”;
copyWS.Credentials = new NetworkCredential(“destinationsite-username”, “destinationsite-password”);// create page in destination site using source page info.
CopyWS.CopyResult[] copyResultArray;
string[] copyDest = { “http://spe2013dev1:4444/Pages/test1.aspx” };
uint myCopyUint = copyWS.CopyIntoItems(“http://wssdev:7001/Pages/test1.aspx”, copyDest, mossPageFieldInfoArray, mossPageByteArray, out copyResultArray);

To confirm the migration process, check CopyResult.ErrorCode, if it is successful than your page gets copied successfully else it will show error message.

Additional Information:

  • Page FieldInformation Array
  • Page Byte Array
  • Page Copy Result
Related link:
http://msdn.microsoft.com/en-us/library/copy.copy.copyintoitems%28v=office.12%29.aspx

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © 2015 Trimantra Software Solution LLP- Software Outsourcing Company India. All rights reserved.