BizTalk Server 2010 

Documentation Feedback and Updates

Microsoft values your feedback. To send feedback and comments about this guide to the documentation team, click here.


The AppFabric Connect feature provides WF developers access to both the BizTalk Mapper and the BizTalk Adapter Pack 2010. This document provides answers to frequently asked questions when using Visual Studio 2010 to develop WF applications that utilize the functionality provided by the BizTalk Server 2010 AppFabric Connect feature.

Developing WF applications that use the BizTalk Mapper

How do I enable this feature?

The BizTalk Mapper activity feature is part of the “runtime” that is installed with the WCF LOB Adapter SDK 2010 which is available for download from BizTalk Server 2010 Beta ( This feature has a dependency on BizTalk Server 2010. Follow the instructions here to ensure that this feature is installed correctly.

I installed BizTalk Server 2010 after installing the WCF LOB Adapter SDK 2010, How do I enable this feature now?

Start the WCF LOB Adapter SDK 2010 installation program from Control Panel → Programs and Features, and choose the Repair option.

The BizTalk Mapper activity is not present in the Visual Studio 2010 ToolBox, what can cause this and how do I fix it?

  • Ensure that you are using Visual Studio 2010, this functionality is not available with previous versions of Visual Studio.
  • Ensure that you are working with a .NET 4.0 project (TargetFrameworkVersion is 4.0 or higher) – this functionality is a WF 4.0 activity.
  • Ensure that you are working with a workflow project.
  • Verify that BizTalk Server 2010 is installed on the computer. Or if BizTalk Server 2010 was installed after the WCF LOB Adapter SDK 2010, refer to item number 2 above.

Why does the compilation of a project with a BizTalk Server Mapper activity fail sometimes?

  • This can occur if the TargetFrameworkProfile property is not set to “.NET Framework 4”. Note that the full profile is needed, just setting this property to the client is not sufficient. For information about how to change the TargetFrameworkProfile property for a project see the Change the Target .NET Framework Version or Profile for an Existing Project section of How to: Target a Specific .NET Framework Version or Profile (
  • Compilation may fail during map class generation. In the case of a C# project, the error text should describe the cause. In the case of a VB project double-click on any error messages to open up the map class file and display detailed error messages.

How do I associate a map with the Mapper activity?

You can either click the “Edit” button on the activity or click on the “BizTalkMapClass” property of the activity. This will allow you to create a new map or select an existing map which matches the types associated with the activity. The existing map can be part of that project or in a referenced assembly.

How do I change or edit the map associated with the Mapper activity?

If a map is already associated with the Mapper activity, to edit the map you can click “Edit” on the Mapper activity. To change the map and associate a different map with the Mapper activity, right-click the Mapper activity and select Properties, then click the "..." button next to BizTalkMapClass in the properties dialog to display the Select a map dialog box. Click the drop-down box next to Select an existing map to select a different map.

How do I handle updates to the data contracts after a map has been generated?

This can be done by right-clicking on the activity and selecting the “Refresh Map” menu item. Refreshing the map will update the schemas and launch the map. Note that if any mappings break due to data contract changes (for example a member was renamed), an error message will be displayed. The rest of the mappings will be preserved.

Why doesn't the deletion of Mapper activity also delete the associated artifacts, such as maps and schemas?

The same map can be used by different Mapper activities in other projects by referencing the generated assembly. In this case, the associated artifacts are not deleted when the Mapper activity is deleted.

How does the Mapper activity decide which serializer to use?

The Mapper activity decides to use the XmlSerializer only if the type is annotated with the XmlType or XmlRoot attributes. If the activity is an array type, the attribute check will be performed on the array element type as well. In all other cases, DataContractSerializer is used.

Note: When creating a map it is possible to use Advanced Options to change the "Serializer to use for Input" and the "Serializer to use for Result" from Auto to DataContractSerializer or XMLSerializer. Manually setting the serializer is not recommended however and extreme caution should be exercised when doing this because specifying the wrong serializer will cause serialization to fail at runtime.

What exceptions are thrown by the Mapper activity at runtime?

The Mapper activity may throw one or more of the following exceptions:

  • ArgumentException – will be thrown If the Mapper activity is unable to locate a specified map class or if the specified map class is not appropriate for the source and target type associated with the activity.
  • ArgumentNullException – will be thrown if the properties “Input” and/or “BizTalkMapClass” have not been specified.
  • Microsoft.ServiceModel.Channels.MapperActivity.MapperActivityRuntimeException – will be thrown if serialization or transform or de-serialization fails.

How do I enable tracing for the Mapper activity?

The mapper activity supports .NET tracing. Depending on the nature of the problem, you will need to set the source appropriately:

  • For issues with map class generation set the source to “Microsoft.ServiceModel.Channels.MapGenerator”.
  • For issues at mapper activity design time and run time set the source to “Microsoft.ServiceModel.Channels.MapperActivity”.

BizTalk Server Adapter Pack 2010

How do I enable this feature?

The LOB activity generation feature ships with the WCF LOB Adapter SDK 2010 which is available for download from BizTalk Server 2010 Beta ( and is an extension of the “Add Adapter Service Reference” feature. The feature is installed when you install the "Tools" component of the WCF LOB Adapter SDK 2010.

Why isn't the LOB activity being generated?

  • Ensure that you are using Visual Studio 2010, this functionality is not available with earlier versions of Visual Studio.
  • Ensure that you are working with a .NET 4.0 project (TargetFrameworkVersion is 4.0 or higher) – this functionality is a WF 4.0 activity.
  • Ensure that you are working with a workflow project.
  • Ensure that you have selected an outbound operation, only outbound operations are supported with this release.
  • Sometimes errors can occur even if the proxy and config are generated successfully. To perform additional troubleshooting follow the steps described in "How do I enable tracing for the LOB activity?"

Why isn't The dialog box that indicates the successful generation of the LOB activity being displayed?

If the activity is being generated but the dialog is not being displayed, you may have selected the “Do not show this message again.” option the first time that the dialog box was displayed. This behavior may continue even if you reinstall the application. To modify the behavior to display the dialog box, launch Regedit and then modify the registry to set the value for the entry “HKCU\Software\Microsoft\WCF LOB Adapter SDK\DoNotRemindActivityGenerated” to false.

How do I pass credentials using LOB activities?

The LOB activity needs to pass credentials to the adapter so it can connect to the LOB. There are several options available for passing these credentials:

  •     Use Windows Integrated authentication – this is possible with the SQL, Oracle DB, and Oracle EBS adapters.
  •     Use mapped mode – this is possible with the SAP adapter which supports SNC.
  •     Implement a custom endpoint behavior that will pull the credentials from a secure store and then set them on the ClientCredentials behavior.
  •     Add the credentials to the URI in a config file – since the credentials are stored in clear text, you will need to set an appropriate access control list for the config file.

For more information about passing credentials using LOB activities please see the following blog posts:

How do I handle the generation of multiple activities?

Every time an activity is generated, several artifacts are generated in the associated proxy file. In certain cases, this can result in compilation errors because of multiple entries for the same artifact. Ensure that you follow the guidelines below to prevent compilation errors when generating multiple activities:

  1. All the operations within a specific category (for example a table in SQL adapter) should be selected at once.
  2. If you want to invoke a given operation on multiple LOB instances (for example query a given table on multiple SQL servers), generate the activity by targeting one of the instances. You can then create multiple instances of that activity that will target the different LOB instances by changing the endpoint address. You will need to manually add the endpoint address for those instances to the config file.

Why won't BAPI transactions work with the SAP LOB activity?

The BAPI call and the commit call must use the same underlying LOB connection. WF doesn't currently support session scope. To work around this behavior, write a custom code activity that invokes both calls from the same proxy instance. For more information about invoking BAPI transactions from a Workflow see the blog post Invoking BAPI Transactions from a Workflow (

Why can't the IIS configuration editor load the LOB adapter bindings?

The BizTalk Adapter Pack 2010 installs several schemas to the %windir%\system32\inetsrv\config\schemas directory. The schema files that are installed will resemble the format “Microsoft.Adapters.Foo_schema.xml”. Ensure that these schema files are installed and present in the %windir%\system32\inetsrv\config\schemas directory. A couple of reasons that these schema files will not be present include:

  •     IIS was installed after BizTalk Adapter Pack 2010 was installed.
  •     This is an x64 machine and both 32 bit and 64-bit versions of BizTalk Adapter Pack 2010 were installed and one of them was subsequently uninstalled.
  •     Windows Server AppFabric is not installed.

Follow these steps to resolve this issue:

How do I enable tracing for a LOB activity?

See Also

Read suggested related topics:

Another important place to find a huge amount of BizTalk related articles is the TechNet Wiki itself. The best entry point is BizTalk Server Resources on the TechNet Wiki