1

I am trying to import an exported sub site which exists in a separate site collection to another site collection that is hosted by different web application.

I'm running the import command like this:

Import-SPWeb http://sitename/destweb -Path ("D:\sourceweb.cmp") –NoLogFile

Then I get an error message:

Import-SPWeb : The DateTime represented by the string is out of rangeImport-SPWeb

In log file, I found it throws an exception at importing a particular document library:

[3/3/2016 10:21:22 AM] [Folder] [مجلد] Progress: Importing [3/3/2016 10:21:22 AM] [Folder] [مجلد] Verbose: Source URL: DocLib/Forms/مجلد [3/3/2016 10:21:22 AM] [Folder] [Docs] Progress: Importing [3/3/2016 10:21:22 AM] [Folder] [Docs] Verbose: Source URL: Docs [3/3/2016 10:21:22 AM] [Folder] [Docs] Error: The DateTime represented by the string is out of range. [3/3/2016 10:21:22 AM] [Folder] [Docs] Debug: at System.DateTime.Parse(String s, IFormatProvider provider) at System.Convert.ToDateTime(String value, IFormatProvider provider)
at System.Runtime.Serialization.SerializationInfo.GetDateTime(String name) at Microsoft.SharePoint.Deployment.MetaInfoProperty..ctor(SerializationInfoHelper infoHelper) at Microsoft.SharePoint.Deployment.DictionarySerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) at Microsoft.SharePoint.Deployment.FolderSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) at Microsoft.SharePoint.Deployment.XmlFormatter.CallSetObjectData(Object obj, SerializationInfo objectData, ISerializationSurrogate surrogate, ISurrogateSelector selector) [3/3/2016 10:21:22 AM] FatalError: The DateTime represented by the string is out of range.

Note: I have the exported sub site as 3 files:

1- sourceweb.cmp

2- sourceweb1.cmp

3- sourceweb2.cmp

Any help would be much appreciated.

Thank you.

  • Is it within the same farm? Do the site collection/subsite have different regional settings? – Christoffer Mar 3 '16 at 7:23
  • Yes it is within the same farm, regional settings are identical, I check the regional settings before running the import command. – Mohammad Akilan Mar 3 '16 at 7:24
  • Can you try to import the web to a site in the same webapplication to see if that works? – Christoffer Mar 3 '16 at 7:25
  • I will try, but to be more specific I generated a log file and I found this: [3/3/2016 10:21:22 AM] [Folder] [مجلد] Progress: Importing [3/3/2016 10:21:22 AM] [Folder] [مجلد] Verbose: Source URL: DocLib/Forms/مجلد [3/3/2016 10:21:22 AM] [Folder] [Docs] Progress: Importing [3/3/2016 10:21:22 AM] [Folder] [Docs] Verbose: Source URL: Docs [3/3/2016 10:21:22 AM] [Folder] [Docs] Error: The DateTime represented by the string is out of range. – Mohammad Akilan Mar 3 '16 at 7:26
  • Must be the something with the regional setting as the error seems to be a generic C# error when it fails to parse the date because of different date settings. Can you compare the regional setting page on your subsite and your target site to see if there is any difference at all? – Christoffer Mar 3 '16 at 7:38
3

I also have same problem. After couple of hours of googling I have found this link http://codecaching.blogspot.ru/2012/11/importing-cmp-and-string-was-not.html

There was a problem with wrong year in date 29 May 60354 05:36:10 -0000 In my case in have not found any wrong dates in my Manifest.xml files but I have found some max dates like 31 Dec 9999 23:59:59.

I think the import process parses the date(31 Dec 9999 23:59:59) and adds timezone to it and goes out of bounds.

I have replaced all 31 Dec 9999 23:59:59 to 31 Dec 2099 23:59:59 and problem has disappeared.

0

I used import-spweb and export sp web with the flag -NoFileCompression

Then it creates everything in a folder , you can then find the manifest file and remove the random dates with (notepad) then import using the same flag and set the path to the folder , this resolved my issue a bit easier than trying to extract and convert multiple cmp / cab files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.