I got the same error as the one in this blog:

System.Configuration.ConfigurationErrorsException: Unrecognized attribute 'ApplicationName'. Note that attribute names are case-sensitive.

The difference is that I got it run-time, where in the blog above, he got it at the time of importing the bindings.

I was afraid that maybe the Cumulative Updates (CUs) were out of sync; and I have a project underway to make sure that both systems are on the latest CU6.

I tried removing the “ApplicationName = ”” out of the binding file and re-importing, but when I went to BizTalk Admin in my Production environment, the Application Name was there in the properties on the WCF-Custom (SQL) send port (and still had a blank value).

I looked for other differences between test and production, and discovered that I had switched it to a 64-bit Host Instance in Prod. When I switched it back to 32-bit Host Instance, it got past this issue.

What I did to cause the error

Dropped an XML file that went through a Map, and was picked up by a Send Port with a CSV Pipeline.
Worked okay if I used PassThru Pipeline.

Suspend Erorr

There was a failure executing the send pipeline: “DL.MGLocationData.Pipelines.MyAppNameLocationDataCSV_Send, DL.MGLocationData.Pipelines, Version=, Culture=neutral, PublicKeyToken=59a32f7375d7234a”
Source: “Flat file assembler” Send Port: “sp_MyAppNameLocationData_CSV” URI: “e:\Integration\Outbound\MyAppNameLocationData\MyAppName_%datetime%.csv” Reason: Object reference not set to an instance of an object


Turn on output map validation for your map.

Check the following:
1) Your are mapping something to every single CSV column
2) You don’t have same column names misspelled (one way in map, and another way in the schema)

Here’s an example where I wanted to create a small XML file with a unique list of TerminalIDs from my application.

On the left, which I had to blur out, the Looping functoid is connected to a parent record that repeats, and the other lines are connect to the source of the TerminalID.

The scripting component has the following “Inline C#” code:

public System.Collections.Generic.List<string> duplicateList = new System.Collections.Generic.List<string>();

public bool IsDuplicate( string terminalID )
     if( duplicateList.Contains( terminalID) )
        return true;
     duplicateList.Add( terminalID );
     return false;

You can see that it creates a collection object called a "Generic.List". It then adds terminalIDs to that list, after checking if the item is already in the list or not. It then returns a true or false.

The logical equals functoid tests the output of the above to "false". I think it is used to make sure we send a boolean true/false to the item on the right side of the map. Maybe it could be avoided, but I saw this in someone else's map, and I left it for now. I made one attempt to remove it and reverse the true/false coming out of Scripting Component, but it didn't work.

In case you didn't know, when set a field on the right side of the map to "false", then that item doesn't get mapped out. You basically suppress it.

The output, when I passed two inputs with "ABC" as the terminal ID is as follows:

<?xml version="1.0"?>
<ns0:UtilListTerminalIDs xmlns:ns0="http://TMW.Integration.Schemas.UtilListTerminalIDs">

Remember that you can right-click the map, and click "Validate" to see the XSLT behind the map. The XSLT file will be shown in the Output window, and you can do a CNTL-Click on the .XSL filename.

Later, I passed two messages to the following C# routine which identifies if a TerminalID was not found in the target database (after doing a query on it). I could have also done the dup logic in the C# routine. This code uses XPath and the XmlDoc.SelectingSingleNode method to lookup the terminal ID in the results of the query. (The database query was previously returned as an XML message in the orchestration.)

I didn't want the orchestration to continue, because it would get an error later when it tries to insert a row into another table that requires the TerminalID to be in the target database.

        public static string FindMissingTerminalIDsInTRMSTResponse(
XmlDocument UtilListTerminalIDs, XmlDocument TRMSResponse)
string rt = "";
string xpathTerminalIDs = "//TerminalID";
XmlNodeList terminalNodes = UtilListTerminalIDs.SelectNodes(xpathTerminalIDs);
int countMatches = 0;
int countNodes = 0;
int countMisMatches = 0;

foreach (XmlNode terminalNode in terminalNodes)
string xpathVerify = "//*[local-name()='TSATRM'][text()='" + terminalNode.InnerText + "']";
Console.WriteLine("xpathVerify=" + xpathVerify);

XmlNode testTerminalExistsNode = TRMSResponse.SelectSingleNode(xpathVerify);

if (testTerminalExistsNode != null)
if (countMisMatches > 1)
rt = rt + ", "; // comma separate after the first one
rt = rt + terminalNode.InnerText;


At first, I was going to return a boolean from this method, but then I decided that I would suspend the orchestration if the input had missing TerminalIDs, and the message should list all the missing IDs in a string. That went into my orchestration Suspend Shape.

I’ve done this many times before, but today, I had numerous issues.

1. I didn’t give the C# subroutine a strong name, and thus it wasn’t in the GAC. This result in “Load Failure” or “Could not load file or assembly…”

2. GacUtil getting code 1 or code 3. I think the code 1 was that I was using a different release of .NET, but not sure. Then the code 3 was because I didn’t have a strong name on it. Obviously, you cannot GAC without a strong name. (I also run a PowerShell to do a GAC, but it gives no errors at all; I’m going to start using GACUTIL instead of that; because at least it gives error when it needs to. The PowerShell fails silently, and acts like it worked.

3. I wrote a C# console tester, then discovered that I forgot to make the methods static; did that, tested in Console, then did a GACUTIL again.

4. Orchestration was still failing. I tried resume, but ended up having to do a full deploy, restart hosts, and resubmit data. I think the fact that whether the routines were static or not was somehow embedded in the map in the same project in which the orchestration was found.

EventLog error on a typed-polling BizTalk WCF-SQL Receive Location

There was a failure executing the receive pipeline: “Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35” Source: “XML disassembler” Receive Port: “ReceivePort.dlsqldev1.tmwdev.Integration_Dev.GetSettlementTWMtoIseries” URI: “mssql://sqlserver//dbname?InboundId=XYZData” Reason: Finding the document specification by message type “http://schemas.microsoft.com/Sql/2008/05/TypedPolling/XYZData#TypedPolling” failed. Verify the schema deployed properly.

Anybody around BizTalk a while knows what this error means with flat files. By why is a Receive Location for WCF-SQL typed-polling causing it?


Client had originally generated the schema in Visual Studio using some query, which was referred to as “ABCData”.
The system was working fine with the one Receive Location. But then they bought another company, so the goal was to have two separate Receive Locations, each polling with a different “SourceSystem” SQL column name. We wanted them separate so the data of the two companies would stay separate, as we were using a lookup to a config file to identify the CompanyID, and then using Dynamic SQL SendPorts to insert the either database ABC or XYZ. The polling database was separate from the ABC and XYZ database.

So let’s say the SourceSystem will have the value ‘ABC’ or ‘XYZ’, and one table needs to be polled for each of those two codes.
Again, we want to start two separate orchestration for each.

So the receive location was “cloned”, by exporting the bindings, duplicating the ReceiveLocation and changing ABC to XYZ. This resulted in two different Address (URI)s. BizTalk requires that every Receive Location have a unique ID.

Problem Starts

So with “typed polling”, BizTalk uses the URI to determine the namespace. Visual Studio sees the schema with the “ABCData#TypedPolling” namespace. So the ABC receive location continued to work okay. The XYZ receive location was failing, sending errors to the event log (but no suspends). The error in the event log is shown at the top of this blog.

Alternative Solutions

One blog suggested using XML polling instead of typed-polling, but our orchestration was already working, and had many maps depending on the current structure. So my solution was to use a “XML_FixMessage’ pipeline that I had developed earlier. This pipeline has several string replace and RegEx replaces, so we could simply change XYZData to ABCData in the pipeline configuration.

Blogs that helped solve thie

TypedPolling with same sql url in wcf-sql adapter
Finding the document specification by message type Error (Sql TypedPolling)

I also had one related blog on this site – see xrefs below.

Suppose you have taken over someone else’s BizTalk orchestration, and it’s huge. You make some changes, and you get a compile error like this:

error X2110: use of unconstructed message 'ExceptionMsg'

Sometimes you can click on the error, and it will take you to the proper location. If that doesn’t work, here the “secret trick”.

Rename the message in the Orhcestration View. For example, put a “2” or the word “bad” on the end.

Now, go to the Orchestration, and scroll down looking for the red exclamation points. That should show you everywhere that message is used.

Now, you should be able to find the cause of the error with a little scrolling and opening a minimal number of shapes.

Same tricks works for variables, to find or cross reference where a variable is used in the orchestration.

Sometimes, links on the Microsoft and MSDN sites disappear or move, so I made a copy of the architecture diagram from BizTalk. It hasn’t been updated since then; while new features have been added, the architecture really hasn’t changed.

BizTalk Server 2009 Runtime Architecture Poster

NOTE: Download the above file (right-click Save-AS), then open with Adobe Acrobat PDF reader, and zoom in to the desired section. This is a wall-size poster.

Below are some other common architecture diagrams that appear in the above poster in a slightly different form:

BizTalk Architecture Diagrams/Images/Pictures

Overall Message Flow



Had to fix some code today left by a prior BizTalk developer.


Shape name: CreateTableTypeLogMessage
ShapeId: 734241d3-f9aa-41da-8696-511010d815f7
Exception thrown from: segment 2, progress 102
Inner exception: There is no value associated with the property ‘EDI.ISA_Segment’ in the message.


When you drop an EDI file, all these fields will exist, and the code would work properly. I was testing by dropping an XML file (the same as created by the BizTalk EDI Receive Pipeline). When you drop an XML file, there are of course no promoted EDI fields. So the developer should check for this and handle accordingly (substituting some dummy/null values instead).

In this case, in Production the error wouldnot occur, becausse there we would presumably always be dropping EDI files. But it is nice to have the flexibility to drop an XML X12 file when needed.

See the “Code Before” shown below. This was in a catch exception block under a scope. The developer was logging almost all the fields in the ISA/GS headers. BizTalk provides promoted fields for some of them, but not all. So he had helper routine in C# which would return the nth item of header.

Code Before:

isaSegment = msgInbound(EDI.ISA_Segment);
gsSegment = msgInboundEDI.GS_Segment);

xpath(msgError,"/*[local-name()='usp_InsertEDILogRecords']/*[local-name()='EDILogRecords']/*[local-name()='udtt_EDITransactionLog']/*[local-name()='ISASender']") = Inbound_CPChemX12(EDI.ISA06);

xpath(msgError,"/*[local-name()='usp_InsertEDILogRecords']/*[local-name()='EDILogRecords']/*[local-name()='udtt_EDITransactionLog']/*[local-name()='ISADate']") = CPChemHelpers.StringSplitter.SplitString(isaSegment,'*',9);

After: Using the “exists” keword

You can make sure the promoted field is there by using the “exists” syntax.
“if (promotedField exists message)” is the syntax, where “exists” is the literal keyword, and the other two would be your values.

NOTE: You cannot use an “if” statement in a “message assignment shape”, only in an “expression shape”. So you would have to set some of these values in an expression shape in variables, and then use those variables in the message assignment shape. So the code below would NOT work as is.

The other alterantive is to use the BizTalk Decide Shape, and have two construct/message-assignment shapes, such that only the appropriate one would execute.

if (EDI.ISA_Segment exists msgInbound)
     isaSegment = msgInbound(EDI.ISA_Segment);
     gsSegment = msgInboundEDI.GS_Segment);

     xpath(msgError,"/*[local-name()='usp_InsertEDILogRecords']/*[local-name()='EDILogRecords']/*[local-name()='udtt_EDITransactionLog']/*[local-name()='ISASender']") = Inbound_CPChemX12(EDI.ISA06);

     xpath(msgError,"/*[local-name()='usp_InsertEDILogRecords']/*[local-name()='EDILogRecords']/*[local-name()='udtt_EDITransactionLog']/*[local-name()='ISADate']") = CPChemHelpers.StringSplitter.SplitString(isaSegment,'*',9);
     // put blank or other values in those fields as desired. 

Decide Shape Solution

The rule itself can be set in the Properties window or by click on the Decide shape. There is a red exclamation here because I changed the message name when I took the screen shot.


You drop an EDI file into a disk directory associated with a BizTalk Receive Location.

Using Tracking or Routing, you see that the XML created begins with this:

<ns0:X12_00401_204 xmlns:ns0="http://mycompany.com/X12/204/App2">

but you are expecting the namespace to look like this:

<ns0:X12_00401_204 xmlns:ns0="http://mycompany.com/X12/204/App">


Why is the namespace wrong? How and where does BizTalk know what namespace to use here?

One Possible Reason

Where I was recently working, I was working on a Version 2 of the system, while another developer was still making modification to Version 1. So that we wouldn’t conflict, I change the end of the namespace from /MyApp to /MyApp2.

When testing with XML, that works fine. But when testing by dropping EDI/X12 files, there is a conflict between the two developers.

Check the Party/Agreeement

When you have a BizTalk EDI Receive Pipeline on the receive location, the default process is that BizTalk uses the company name id and qualifier to find the Party in the Trading Partner Management (TPM) system, aka the “Parties”.

If Biztalk Admin console, expand the Parties and find the Party you are testing. If you are not sure which party goes with your qualifier and ID in your EDI file, you can run this SQL to XREF EDI Qualifier to BizTalk party name.

Each party can have one or more agreements. Try to find the X12 agreement and open it. At the top, there will be two tabs: YourCompany->Party and Party->YourCompany. Since we are receive an EDI file, click the “Party->YourCompany” tab.

Then find the document you are dealing with by number, e.g. 204, 850, 855 etc… in the “Transaction Type” column. Then scroll right to the “Target namespace” column. The value there is what should appear in the XML.

Also check the “Local Host Settings

In a BizTalk map, you can add scripting functoids without connecting them to anything. They can contain functions, as shown below.

Note 1: You must add a constant for each variable, so if you have 3 parameters, then add three constants values on the “Functoid Inputs” tab.

Note 2: They will have a warning icon on them, indicating no inputs or outputs.

Now, anywhere else in the map, you can add a Scripting Functoid, and simply call the shared C# function from above:

A better approach is probably have to have a C# Map.Helpers class/assembly where you have all the reusable functions. Then you can also re-use them across different maps.