.comment-link {margin-left:.6em;}

Ben Cops

Monday, July 26, 2004

Making IE status bar stay ON

KevinDonahue.com [Internet Explorer Status Bar]:
So I'm going nuts for a week because I cannot get the status bar to appear by default when I launch Internet Explorer. There must be a fix, right? You betch ya!

This has been quietly pissing me off for AGES.

Tuesday, July 20, 2004

A basic introduction to messaging - MS BizTalk Server 2004

A basic introduction to messaging - MS BizTalk Server 2004

Skims over a fair bit but a lot of basic info and therefore a valuable resource

Saturday, July 17, 2004

Unit Testing Pipeline Components

It seems like all I ever post about is pipeline components, but I've got some pretty heavy pipeline work to do over the next few months, so I knocked up a simple pipeline component unit testing framework. 
Its a lot easier than I could have hoped to spoof the executing context of a BTS2004 pipeline.  My initial plan was to decompile pipeline.exe in the SDK (as it does exactly what I want - runs a pipeline out of BTS), but it became immediately obvious that everything I needed was provided and nicely exposed by PipelineObjects.dll in it's root folder.  So that concrete implementation of IPipelineContext and IBaseMessage that was going to be so crucial in fooling a standard pipeline component to run Execute(IPipelineContext, IBaseMessage) was just a new away.
The rest wrote itself really.  I'm left with a class that takes an instatiated Pipeline component, and calls Validate() on it to check you've also remembered to set all its props.  It then passes a string you give it as a message, and lets you know the output for unit testing.  Its proper bo!

Tuesday, July 06, 2004

BTS2004 Delivery Notifications

Scott Woodgate's article on receiving BTS2004 Delivery Notifications details how to do something about delivery failures on send ports.

Monday, July 05, 2004

What is the difference between distinguished and promoted fields?

What is the difference between distinguished and promoted fields?

Basic rule for which to use would be: always use a distinguished field,
unless you have to route, track, or correlate on the source content, then use a
property (i.e. promoted field).

Save an XML Document to a stream without the XML declaration

This is really handy if you feel the encoding attribute of the XML declaration you're forced to accept from XMLDocument.Save() is causing you grief:
GotDotNet User Sample: XmlFragmentWriter for Xml Serialization

Basically it uses reflection to set a private field on an XMLTextWriter to fool the writer into thinking its already written the declaration. Naughty!

// get to the currentState field
Type xmlTextWriterType = typeof( System.Xml.XmlTextWriter );
FieldInfo currentStateFieldInfo = xmlTextWriterType.GetField(
"currentState", BindingFlags.Instance | BindingFlags.NonPublic );

// get the State enumeration
Type stateEnumType = xmlTextWriterType.GetNestedType( "State",
BindingFlags.NonPublic );

// set the currentState to Prolog written
currentStateFieldInfo.SetValue( this,
stateEnumType.GetField( "Prolog" ).GetValue( this ) );

Debugging Pipeline Components

In case it's not immediately obvious: To debug your pipeline components whilst in use, simply deploy the pdb files along with your dll to the PipelineComponents directory, and attach Visual Studio to the BTSNTSvc.exe process