Mass Replace Text in All Files in a Windows Directory

Today I needed to do a mass string replace in all files in a directory.  Years ago, I used to use BKReplacem.  Today I found FNR – Find and Replace, a free utility that worked great the first tiem I ran it. At my current client, someone had created a BizTalk project a year ago, […]

C# to Write to MSMQ

This blog shows how to write to MSMQ from C#. In an earlier blog, I showed how to write to MSMQ from Powershell. There are two tricks: 1) With Transactional Queues you have to include the Transaction, and also specify the second parm on the .Send method. 2) MessagePriority is only supported in non-transactional queues. […]

Overview of BizTalk 2010/2013 EDI Batching

I had to spend a few hours today to dig into the batching features of BT2010 (I don’t think 2013 is much different, but don’t know about earlier releases). The MSDN walkthrough can be found here:  2010 or 2013.  Finding the MSDN doc for BT2010 itself was a bit of a challenge. In my case, […]

BizTalk Error: You have selected an invalid pipeline component

You can an “Invalid Pipeline Component” error when you browse to a .DLL in the “Choose Toolbox Items” dialog box. Error “You have selected an invalid pipeline component assembly. Please check security settings for the assembly if you are loading it from an UNC path.” Solution This Patric Wellink blog put on the right path […]

Day of Week in Oracle

Sample SQL <pre> select     to_char(sysdate,'D') as NumDayOfWeek,     to_char(sysdate,'DY') as DayOfWeek,     to_char(sysdate,'Dy') as DayOfWeekLower,     case when to_char(sysdate,'D') = 3 then 3 else 1 end as DaysBack     from dual; </pre> Result of Query Explanation to_char(sysdate,’D’) returns 1 for Sunday, 2 for Monday etc… “dual” is of course the dummy table used to run a select statement when […]

C# EDI Parser – Using RegEx Capture to Xref PO to Filename

This C# code fragment illustrates how to use the RegEx Captures collection within RegEx Groups. I needed the ability to read all files in a directory, and build a CSV to cross reference the PO number to the EDI file it was in. <pre>             //Pattern we want, but then escape all the ^ signs  "REF^BM^(\d*)~";             string […]

BizTalk: “Object reference not set to an instance of an object.” in Loop

Was getting this error xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'MyProjectName.MyOrchName(8f69ac91-51ae-67be-b342-b3ee431859ca)'. The service instance will remain suspended until administratively resumed or terminated. If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception. InstanceId: a38b30ab-455a-479e-8015-ac6d6960b5e9 Shape […]

BizTalk XPath on Left Side of Assignment (equal sign)

How do you use the XPath statement on the left side of an assignment statement (i.e.. the left side of an equation or the equal sign)?  I’m referring to a message assignment shape, in an orchestration, where you want This is the MSDN page for the BizTalk XPath statement.  There are two problems with that […]

BizTalk Orchestrations vs Content Based Routing

When you create a new application, sometimes you have a choice between doing it in an orchestration vs doing the whole thing with send and receive ports and no orchestrations.  The later is called “content based routing,” where messages are routed based on the Filters in the Send Ports. I’m more or lesson assuming you […]

Archive Directory Slow to Open – Powershell Moves Files to Dated Subdirectories

With BizTalk, we often archive files in a sub directory. Personally, I would rather archive to a SQL database with a database column, but that takes a little more architecture and sales. So in the meantime, many clients continue to write files to disk. There are frequently clean-up jobs that delete files over x days […]