Message Archiving Receive Pipeline Component

Update: The Message Archiving Component is now maintained by Atomic-Scope, visit for more information.

Today I’m releasing a message archive receive pipeline component (BTS06 only) – I’ve been meaning to release the code for this component for some time, but never got around to it.

The component is designed to be used in the decode stage of a receive pipeline to archive a message before any BizTalk processing (with the exception of the adapter) is started. An output directory and filename can be specified in the component properties, with the following macros (which will be expanded to their real-world values) available in the filename:

  • %MessageID% – Expands to the unique Message Id;
  • %ReceivedFileName% – Expands to the received filename, less the extension;

the remainder all expand to their context property values:

  • %InboundTransportLocation%
  • %InterchangeID%
  • %ReceivePortID%
  • %ReceivePortName%
  • %AuthenticationRequiredOnReceivePort%
  • %InboundTransportType%
  • %MessageExchangePattern%
  • %PortName%
  • %ReceivePipelineID%

For example, specifying an archive filename of:


with a file called ‘TestArchive.xml’ will produce an output filename of:


The VS project (including full source-code) can be found in the downloads area under ‘Message Archiving Receive Pipeline Component’ (a 14Kb zip file). Details of how to make the compiled binary available in a BizTalk project can be found here.

“Uncaught exception” when SQL Adapter Processes Multipart Messages

I’ve just finished working for a client who needed to insert multiple records into a SQL Server database from an Orchestration. This isn’t anything particularly hard using the SQL adapter, but after a review of the requirements it became apparent that further processing needed to be done after each insert. We therefore decided to move to stored procedures and add the additional processing at the database level.

This again shouldn’t have been a problem – we were simply generating a SQL Insertgram (are they all called that?) that executed the same stored procedure several times instead of performing several direct inserts.

Unfortunately, we encounted the following error as the response message was received back into the orchestration (I have omitted the message name for brevity):

Inner exception: Multi-part message [Msg Name] has body part 'BodyPart3', expected body part 'BodyPart1'.

It would appear that the ‘out-of-the-box’ SQL adapter shipped with BizTalk 2006 doesn’t like multipart messages being returned from the adapter and throws the message above. The KB article 918316 has all of the gory details – the hotfix simply updates the SQL adapter DLL to version 3.5.1612.0.

Following installation of the hotfix, the error disappears and multipart mesages can be successfully returned by the SQL Adapter.

Running .Net 1.1 & 2.0? You’ll need BizTalk 2004 with SP2

I’ve just read this thread over on the BizTalk newsgroups relating to a failing BizTalk 2004 custom receive pipeline following a side-by-side installation of the .Net 2.0 Framework.

I was always under the impression that BizTalk 2004 would ‘just work’ with a side-by-side install of .Net 2.0… obviously not. A fellow poster, Saravana, points us to Microsoft KB Article 841405 – it would appear that BizTalk 2004 versions prior to SP2 cannot run with .Net 2.0 installed alongside. So if you want to run both versions of the framework, upgrade to BTS04 SP2.

Given that this is news to me, I thought I would post to the community (thanks to Saravana for the pointer)!