BizTalk: List of Errors and Warnings, Causes and Solutions

BizTalk: List of Errors and Warnings, Causes and Solutions

A client ask me to create a wiki about BizTalk errors and how to clear it. A quick search on your favorite search engine give me a great technet article. I share it with you because it covers a lot of errors and the explanations are efficients http://social.technet.microsoft.com/wiki/contents/articles/7204.biztalk-list-of-errors-and-warnings-causes-and-solutions.aspx Don’t forget to add it in your […]
Blog Post by: Jeremy Ronk

BizTalk360 US Road show experience

I had no plans to write the story of my US road show experience, but thought it was a great 1 week experience and I wanted to capture the moments before it vanishes from my memory. Initially I was not really looking forward for this trip. There is going to be lot of travel, staying […]

The post BizTalk360 US Road show experience appeared first on BizTalk360 Blog.

Blog Post by: Saravana Kumar

BizTalk 2013 Installation and Configuration – Install Visual Studio 2012 (Part 6)

BizTalk 2013 Installation and Configuration – Install Visual Studio 2012 (Part 6)

The BizTalk Server development tools are based on Visual Studio. And like previous versions, at a minimum, you must have the Microsoft Visual C#%u00ae .NET component of Visual Studio installed on your computer if you wish to install the BizTalk Server Developer Tools and SDK component. Note: Visual Studio 2012 is not required if you […]
Blog Post by: Sandro Pereira

Tracing with ESB Toolkit 2.2

Tracing with ESB Toolkit 2.2

Thanks to TomassoGroenendijkfor figuring this one out and sharing. As with previous versions of the ESB Toolkit there is a minor change required to get tracing working. The switch name no longer has the version number appended to it. So instead of “BizTalkESBToolkit20″ or “BizTalkESBToolkit21″ as in previous versions, it is now “BizTalkESBToolkit”. This should […]
Blog Post by: Colin Meade

Going to Microsoft TechEd (North America) to Speak About Cloud Integration

Going to Microsoft TechEd (North America) to Speak About Cloud Integration

In a few weeks, I’ll be heading to New Orleans to speak at Microsoft TechEd for the first time. My topic – Patterns of Cloud Integration – is an extension of things I’ve talked about this year in Amsterdam, Gothenburg, and in my latest Pluralsight course. However, I’ll also be covering some entirely new ground […]
Blog Post by: Richard Seroter

BizTalk360: Counter for number of required host instances for healthy environment

Just like me if you have created the host instances for all the hosts on every machine ( 2 in thisexample ) in BizTalk group and still wondering why you are not getting the count of host instance equal to number of host multiplied by the BizTalk server (in above case 17*2=34) then this could be the answer.- In this example there were 3 isolated hosts; BizTalk360 was not considering

BizTalk 2013 Installation and Configuration – Install Microsoft Office Excel 2013 (Part 5)

BizTalk 2013 Installation and Configuration – Install Microsoft Office Excel 2013 (Part 5)

Microsoft Office Excel is required for using the Business Activity Monitoring (BAM) feature in BizTalk Server. You use the BAM Office Excel Workbook to define the business processes you want to monitor. You also use the BAM Excel Workbook to define the way in which business users see the data collected by BAM. Note: BizTalk […]
Blog Post by: Sandro Pereira

How to fix the error “Exception has been thrown by the target of an invocation.” when using the BRI resolver in the ESB Toolkit and BizTalk 2013

In BizTalk 2009 and BizTalk 2010, there are often problems when installing the ESB Toolkit but then it (almost) always works well. In BizTalk 2013 The BizTalk Server installer now provides the option of installing ESB Toolkit as well. The configuration process is also much simpler so you would think it’s now more integrated with BizTalk Server 2013. Unfortunately, that is not entirely true. Installation has indeed become easier but also there are some new bugs added!

A great feature of the ESB Toolkit is that you can use business rules to select an itinerary based on the content of a received message. But when you have configured an Itinerary Selector pipeline component in BizTalk 2013 to use a business rules policy to select the appropriate itinerary, you get the following error:

“Exception has been thrown by the target of an invocation.”
 
On the BizTalk ESB Toolkit Forum you can see that other users also have this problem so it’s starting to seem that this is a bug!
 

 

Identifying the exact error

The error “Exception has been thrown by the target of an invocation.” is to generic and doesn’t help very much but combined with Error StackTrace you see which .dll file, the method and the object that creates the error. As is often your best friend is Reflector so let’s have a closer look at the “ResolverFactory.Create” method in the Microsoft.Practices.ESB.Resolver.dll.

 
Yeah but what now? Let’s try to copy that piece of code into a new solution in Visual Studio and run and debug it.
 
Ok, I can now see that an instance of the “Microsoft.Practices.ESB.Resolver.Unity.ResolveProvider” object is going to be created. That’s a bit more information but combined with the Inner Exception, we know what’s really going on.
 
InnerException: “Unrecognized element ‘typeConfig’. (C:\Program Files (x86)\Microsoft BizTalk ESB Toolkit\esb.config line 153)”
 

 

How to fix the bug

The “Microsoft.Practices.ESB.Resolver.Unity.ResolveProvider” object in the ESB Toolkit 2.2 uses the Microsoft Enterprise Library 5.0 and Unity 2.0. When you google/bing on “Unrecognized element ‘typeConfig’.” and Unity, it becomes clear that Unity 2.0 uses a new streamlined configuration schema for configuring Unity. Therefore, the esb.config file from the ESB Toolkit must be modified.

The following adjustments should be made:

  • Remove the <typeConfig> element
  • Change the <typeAlias> element to <alias>
  • Change the <type> element to <register>.
  • Remove the <containers> elements and <types> elements.

For more information see The Unity Configuration Schema in Unity 2.0.

Changes in file: C:\Program Files (x86)\Microsoft BizTalk ESB Toolkit\esb.config
 

 

Testing the changes in the esb.config

I used the sample How to: Select an Itinerary Using a Business Rules Policy to test the changes, but first I changed the machine.config file to be able to see BizTalk ESB Toolkit trace output.

To enable the BizTalk ESB Toolkit trace switch, add the following <switches> element to the system.diagnostics section of the Machine.config file.
<system.diagnostics>
      <switches>
          <add name="BizTalkESBToolkit" value="4"/>
      </switches>
 </system.diagnostics>

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

 
Now when you receive a message in BizTalk you can see the trace output from the ESB Toolkit. In the last line you can see that the itinerary is found and added to the cache!
 

 

Conclusion

These adjustments in the esb.config file are not exactly rocket science yet it has taken me a long time to find the exact error and make the proper adjustments because the original error message was to generic and you have to perform a lot of work to find out what’s going wrong!

You can download the updated esb.config file here:

modified_EsbConfig.zip