Assume that you use the SharePoint Services adapter in Microsoft BizTalk Server 2013. When you download files from SharePoint Server 2013 document libraries that contain managed metadata columns by using the adapter, you receive the following error message:
The Windows SharePoint Services receive adapter has failed to process the SharePoint file FileName. 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.
This error was triggered by the Windows SharePoint Services receive location or send port with URI wsss://[...]?ViewName=ToBizTalk.
Windows SharePoint Services adapter event ID: 12457
The issue occurs because BizTalk Server 2013 uses SharePoint 2010 client libraries. However, SharePoint 2013 client libraries are expected.
Cumulative update information
This issue was first fixed in the following cumulative update of BizTalk Server:
To work around this issue, use one of the following workarounds:
Don't use managed metadata columns in SharePoint Server 2013 document libraries.
Replace the referenced SharePoint 2010 assemblies with SharePoint 2013 assemblies from the SharePoint 2013 server:
Microsoft.SharePoint.Client, Version=18.104.22.168, Culture=neutral, PublicKeyToken=71e9bce111e9429c
Microsoft.SharePoint.Client.Runtime, Version=22.214.171.124, Culture=neutral, PublicKeyToken=71e9bce111e94
Then, create the following binding redirection in BizTalk configuration files (BTSNTSvc.exe.config and BTSNTSvc64.exe.config):
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
For more information about the service packs and cumulative update list for BizTalk Server, see KB 2555976: Service pack and cumulative update list for BizTalk Server.
For more information about BizTalk Server hotfixes, see KB 2003907: Information about BizTalk hotfixes and cumulative update support.