T4 Template Custom Host and BizTalk Pipeline

Frameworks like ASP.NET are well equipped with templating engines, and more so now with the extensibility that ASP.NET MVC offers (can run with the awesome Razor view engine, or swap in a view engine of your liking such as the excellent Spark view engine). Simply put, a views template is responsible for transforming a model into a representation. A T4 text template is a mixture of text blocks and control logic that can generate a text file. The control logic is written as fragments of program code in Visual C# or Visual Basic. The generated file can be text of any kind, such as a Web page, or a resource file, or program source code in any language. ...

April 16, 2012 · 6 min

The BizTalk WCF SQL Binding and MSDTC

Highlights a common misconfiguration of the BizTalk WCF Adapter Pack 2.0 SQL binding. Here’s an interesting tale. If you find errors and BizTalk interesting. The following, very descriptive error (it’s true) occurs when you attempt to use the BizTalk WCF Adapter Packs (2.0) SQL binding with a remote SQL server database, that is not configured to allow remote DTC (Distributed Transaction Coordinator) sessions to take place. Error Description: System.Transactions.TransactionException: The partner transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D025) ---> System.Runtime.InteropServices.COMException: The partner transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D025) at System.Transactions.Oletx.ITransactionShim.Export(UInt32 whereaboutsSize, Byte[] whereabouts, Int32& cookieIndex, UInt32& cookieSize, CoTaskMemHandle& cookieBuffer) at System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts) --- End of inner exception stack trace --- Server stack trace: at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result) The SQL machine needs to be opened up. This can be done by using the Component Services MMC snap in (comexp.msc). ...

July 11, 2011 · 2 min

BizTalk Custom WCF Behaviour

The ability to easily implement custom processing within the WCF stack, is one of the main reasons why WCF (Windows Communication Foundation) is such a rich programming paradigm compared to other ways of communication. WCF, when paired with BizTalk Server, opens up numerous extensibility options that were previously not possible. A particularly useful piece of WCF extensibility, is commonly referred to as behaviors. Behavior extensions are one of the components that differentiate WCF from other Web services technologies in the market. By using this feature, developers can add custom extensions that inspect and validate service configuration or modify run-time behavior in WCF client and service applications. Custom behavior extensions can exist at both the WCF service and client levels. Configuring a behavior on the call stack to a WCF service has no influence on the communication binding used to make the call. In fact, behaviors are typically invisible to the client because they are not displayed in the metadata that a service publishes. The client typically has no idea that the extensions are running during a call to a WCF operation. ...

June 26, 2011 · 5 min

SSO Configuration Road Block

Recently I’ve had the need to setup a BizTalk Server 2006 R2 virtual machine. Quietly confident about my experience with this version of BizTalk, I jumped in head first to quickly get a simple single server based installation configured on a 32-bit VMWare based VM. Lesson learned today; never, ever underestimate the obscure errors that BizTalk Server can produce. The install was smooth sailing. But when the time came to configure SSO, this happended: ...

November 24, 2010 · 2 min

BizTalk Server 2010 Prerequisite CAB Files

Exciting times! BizTalk Server 2010 is out and as per every major release of the product there are a fresh set of redistributable CAB links to hunt down. These links available from the official installation guides. Windows Server 2008 and 2008 R2 Language </td> <td valign="top" width="295"> Windows Server 2008 32-bit Edition ...

October 3, 2010 · 3 min

BizTalk Servers Slow First Hit

Lately I been thinking about BizTalk Server, and a particular behavior that it consistently demonstrates without fail. It takes a dreadful amount of time to service a “cold” request, however once “warmed”, it hums. Its challenging at best to justify this behavior to a technology ignorant client. Without getting too deep into BizTalk Servers internals (I would love to spend some time with windbg and the SOS extension digging around), I wanted a way to have partial control over how BizTalk Server manages the actual processes that invoke the code we make. All mainstream BizTalk artefacts (orchestrations, maps, pipelines) boil down to managed code (IL). BizTalk consumes our crafted “business” assemblies (dll’s) by loaded them into its address space through one or more AppDomain’s, at which time the messaging engine can call out to them when it sees fit. ...

August 2, 2010 · 3 min

Sharing Libraries in a Team

When developing in a team consisting of more members than yourself, you’ll quickly run into the scenario where shared libraries and/or other similar resources need to be shared in someway. Its especially nice when you can cleanly compile code freshly pulled from source control. In my opinion, this is a must. Sloppiness here can cause heartache throughout the the entire development lifecycle of the project. This problem is aggravated with the introduction of new starters that come on board…they do a get latest, build and spend the next few days crawling through hundreds of build errors. ...

June 13, 2010 · 2 min

BizTalk Server 2009 Unit Testing

I feel like i’ve missed the boat with this, but the “first class” unit testing support that has been added to BizTalk Server 2009 is terrific. Unit testing with BizTalk Server up to this point, has always been very painful and custom. How was this ground breaking feat made possible? A project level build switch has been added to all Visual Studio BizTalk project types. Check it out, bring project properties up for any BizTalk 2009 project in your solution, and there will be an “Enable Unit Testing” true/false flag sitting there. ...

June 12, 2010 · 2 min

C# 3.0 Language Extensions

Put together a little snippet to remind myself of the some of the beautiful language extensions that shipped with the C# language. {% highlight csharp %} namespace CSharpLanguageExperiment { using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { // Object Initialiser Person bill = new Person { FirstName = “Bill”, LastName = “Gates”, Age = 40 }; // Type Inference var ben = new Person { FirstName = "Ben", LastName = "Simmonds", Age = 25 }; // Anonymous Types var john = new { FirstName = "John", LastName = "Smith", Age = 18 }; // Anonymous Delegate Func<string, bool> filter1 = delegate(string name) { return name.Length > 4; }; filter1("hel"); // Lambda Expression Func<string, bool> filter2 = x => x.Length > 4; filter2("foobar"); // Extension Method ben.GetData(); // Queries List<Person> people = new List<Person>(); people.Add(bill); people.Add(ben); Func<Person, bool> filter = x => x.Age > 30; IEnumerable<Person> exp = people.Where(filter); foreach (Person person in exp) { Console.WriteLine(person.GetData()); } } } ...

December 25, 2008 · 2 min

70-235 Certified

A few weeks ago I sat the 70-235 exam. Coming from a real-world perspective I wasnt overly impressed with the exam. To me it felt mind numbingly robotic and very 2006 R1 feature set focused (e.g. BAM and BRE). However the exam successfully probed some interesting areas within BizTalk, encouraging me to learn things about BizTalk that I would not otherwise get exposure to. Patrick Wellink’s post How to prepare for the BizTalk 2006 Exam concisely summarised how to prepare for this exam. At first I sensed some sarcasm in Patrick’s post, but now having successfully passed the exam found his post to be scaringly accurate. ...

December 21, 2008 · 2 min