SharePoint 2010: Content deployment fails with SPInvalidPropertyException

Article ID: 2671324 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

Consider the following scenario:

- You have two MOSS 2007 farms with content deployment jobs that push content from a source farm to a destination farm.

- You upgrade both farms to SharePoint Server 2010

- You enable usage analytics processing only on the source farm

Once the monthly site usage total bandwidth exceeds 2 gigabytes, the next incremental content deployment job will fail with the following error: 

The exception thrown was 'Microsoft.SharePoint.SPInvalidPropertyException': 'Specified data type does not match the current data type of the property.'

CAUSE

Since the destination farm’s usage analytics processing is disabled and the timer job has not been run yet, it is leaving the vti_siteusagetotalbandwidth property of the root web using the Int32 data type created by MOSS 2007. SharePoint Server 2010 uses Int64 data type which is stored as a string. The content deployment fails due to a conversion error from Int64 to Int32 when the value is bigger than Int32.MaxValue (2147483647).

RESOLUTION

Using the following PowerShell script executed in a SharePoint Administration console you can convert vti_siteusagetotalbandwidth property to String in every site collection in a farm. You have to execute it once on each destination farm after they are upgraded from MOSS 2007 to avoid the SPInvalidPropertyException.

get-spsite -limit all | % {
    write-host $_.Url
    $web = $_.RootWeb
    $item = $web.AllProperties["vti_siteusagetotalbandwidth"]
    if ($item -ne $null -and $item.GetType().Name -ne "String") {
       
        $itemstr = $item.toString();
        Write-host "Converting value  $itemstr at  $($web.Url) ";
        $web.AllProperties.Remove("vti_siteusagetotalbandwidth");
        $web.Update();
        $web.AllProperties.Add("vti_siteusagetotalbandwidth",[System.String]$itemstr);
        $web.Update();
    }
    $web.Close();
    $site.Close();
}
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2671324 - Last Review: February 6, 2012 - Revision: 6.0
APPLIES TO
  • Microsoft SharePoint Server 2010
Keywords: 
KB2671324

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com