Windows SharePoint Services adapter error 12310

BizTalk Server 2013 (CU2) could not download a file from a SharePoint 2013 document library. File was left in checked out state on SharePoint and on BizTalk Server you could read:

The Windows SharePoint Services receive adapter has failed to process the SharePoint file test.txt. The following error has been encountered:
[System.InvalidCastException] Unable to cast object of type ‘System.Collections.Generic.Dictionary`2[System.String,System.Object]’ to type ‘Microsoft.SharePoint.Client.Field’.
Error code: 12310
Once you have addressed the issue causing this problem, you can undo the check-out for this file and the adapter will try to process it again.

My colleague and I identified that the error was raised if file was downloaded from a document library having a column of Managed Metadata type. So we contacted Microsoft’s support and they pointed out that we are using wrong version of SharePoint client libraries:

  • Microsoft.SharePoint.Client.dll, File version: 14.0.4762.1000
  • Microsoft.SharePoint.Clinet.Runtime.dll, File version:  14.0.4762.1000

But those files came from BizTalk installation and they are referenced by the SharePoint adapter. So while Microsoft are working on the issue, you can use this workaround:

  • Replace SharePoint client files located in C:\Program Files (x86)\MicrosoftBizTalk Server 2013 with their newer versions copied fromSharePoint 2013 server (file version may differ, but it should start with 15):
    • Microsoft.SharePoint.Client.dll, File version: 15.0.4505.1005
    • Microsoft.SharePoint.Clinet.Runtime.dll, File version:  15.0.4420.1017
  • Under runtime section of BTSNTSvc.exe.config file add assembly binding redirection section
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
     <assemblyIdentity name="Microsoft.SharePoint.Client"
     culture="neutral" />
     <bindingRedirect oldVersion=""
     <assemblyIdentity name="Microsoft.SharePoint.Client.Runtime"
     culture="neutral" />
     <bindingRedirect oldVersion=""
  •  And restart SharePoint host instances of BizTalk Server

Disclaimer: The workaround is not provided by Microsoft.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s