<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>BizTalk Server 2004/2006</title>
        <link>http://geekswithblogs.net/cyoung/category/402.aspx</link>
        <description>BizTalk Server 2004/2006</description>
        <language>en-GB</language>
        <copyright>Charles Young</copyright>
        <managingEditor>charles.young@solidsoft.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>MS BRE: Using Compensation handlers</title>
            <link>http://geekswithblogs.net/cyoung/archive/2008/01/23/118805.aspx</link>
            <description>&lt;p&gt;&lt;font face="Verdana" size="2"&gt;Being known for my interest in rules processing, I quite often get asked to help with problems with MS BRE.   A couple of days ago, I was asked to help investigate an issue occurring in production for a BizTalk Server application.   Occasionally, in a fairly high throughput system, BizTalk logs an error stating that a problem has been encountered while executing a rule set.   That is the only information provided, with no hint of what the problem might be, and because the issue only occurs intermittently under real-world conditions in the production environment, it was not obvious how to obtain further insight without disrupting live operations.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" size="2"&gt;&lt;a href="http://geekswithblogs.net/cyoung/archive/2008/01/23/118804.aspx"&gt;This article&lt;/a&gt; investigates one way of handling this deilemma through the use of the compensation handling feature of Microsoft's Business Rules Engine.   It goes on to discuss the broader use of compensation handling in rule processing.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" size="2"&gt;&lt;a id="ctl00_pageContent_Editor_Edit_hlEntryLink" title="view: MS BRE: Using Compensation handlers" href="http://geekswithblogs.net/cyoung/articles/118804.aspx"&gt;http://geekswithblogs.net/cyoung/archive/2008/01/23/118804.aspx&lt;/a&gt;&lt;br /&gt;
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118805"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118805" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/cyoung/aggbug/118805.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Charles Young</dc:creator>
            <guid>http://geekswithblogs.net/cyoung/archive/2008/01/23/118805.aspx</guid>
            <pubDate>Wed, 23 Jan 2008 00:48:52 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/cyoung/comments/118805.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/cyoung/archive/2008/01/23/118805.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/cyoung/comments/commentRss/118805.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/cyoung/services/trackbacks/118805.aspx</trackback:ping>
        </item>
        <item>
            <title>MS BRE:  The Rules Engine Update (REU) Service and Policy Execution</title>
            <link>http://geekswithblogs.net/cyoung/archive/2008/01/13/118507.aspx</link>
            <description>&lt;div&gt;&lt;font face="Verdana" size="2"&gt;A question came up tonight on BizTalkGurus on my favourite subject of rule engines.   I don’t blog enough these days, so this gives me an excuse.    Essentially, the question concerned an incorrect, but understandable, suspicion that MS BRE may be using remoting to execute rule sets out-of-process.   This is not the case.    You can find an article describing what actually happens at:&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Verdana" size="2"&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Verdana" size="2"&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Verdana" size="2"&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;a title="view: MS BRE:  The Rules Engine Update (REU) Service and Policy Execution" href="http://geekswithblogs.net/cyoung/articles/118506.aspx"&gt;&lt;font face="Verdana" size="2"&gt;http://geekswithblogs.net/cyoung/archive/2008/01/13/118506.aspx&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118507"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118507" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/cyoung/aggbug/118507.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Charles Young</dc:creator>
            <guid>http://geekswithblogs.net/cyoung/archive/2008/01/13/118507.aspx</guid>
            <pubDate>Sun, 13 Jan 2008 22:13:24 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/cyoung/comments/118507.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/cyoung/archive/2008/01/13/118507.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/cyoung/comments/commentRss/118507.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/cyoung/services/trackbacks/118507.aspx</trackback:ping>
        </item>
        <item>
            <title>Using .NET 3.5 and Visual Studio 2005</title>
            <link>http://geekswithblogs.net/cyoung/archive/2007/12/01/117279.aspx</link>
            <description>&lt;p style="MARGIN: 6pt 0cm 3pt 11.35pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="2"&gt;The recent release of Visual Studio 2008 and .NET Fx 3.5 is causing some confusion.&lt;span&gt;    Microsoft released these two technologies together for good reason.   The wonderful new LinQ technologies introduced in .Net 3.5 rely on explicit compiler-level support, and therefore require LinQ aware compilers in Visual Studio.   The new version of visual Studio provides these compilers, allowing developers to take advantage of the new monadic syntax. In addition, Visual Studio has several new features designed to make it easier to exploit NET 3.5 features such as Ajax and the foundation libraries (WCF, WF and WPF).&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 6pt 0cm 3pt 11.35pt"&gt;&lt;font face="Verdana" size="2"&gt;&lt;span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 6pt 0cm 3pt 11.35pt"&gt;&lt;font face="Verdana" size="2"&gt;The problem is that by tying the release of .NET 3.5 to Visual Studio 2008, the impression is given that, unless you are ready to upgrade to the new version of the IDE, there is no point thinking about upgrading to the new version of the framework.&lt;span&gt;    This is simply not the case.   The .NET framework does not have any built-in dependency on Visual Studio, let alone a specific version of Visual Studio.   More to the point, Microsoft has long since split the versioning of the framework from the versioning of the run-time environment. .NET 3.5 continues to exploit version 2.0 of the CLR. Visual Studio 2005 is perfectly happy to compile your code against .NET 3.5 assemblies.   They are just assemblies.   Even more compelling is the realisation that most of the assemblies in .NET 3.5 are identical to those in .NET 3.0 (same version number).   There are some new assemblies with new features. .NET 3.5 is just .NET 3.0 with extra stuff.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 6pt 0cm 3pt 11.35pt"&gt;&lt;font face="Verdana" size="2"&gt;&lt;span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Verdana"&gt;&lt;font size="2"&gt;Why is this important?&lt;span&gt;   Well, not everyone is ready to upgrade to Visual Studio 2008.   Apart from the expense this involves, consider the dilemma of BizTalk Server developers.   Currently, there are no Visual Studio 2008 bindings for BizTalk Server (i.e., you can't create BizTalk Server project types in the new IDE).   This, we are assured, will be addressed at some point, but that could be months away.    For the time being, BizTalk developers are stuck with Visual Studio 2005 :-( Hence, some people are currently discounting the possibility of using .Net 3.5 because they believe, quite incorrectly, that it requires an upgrade to Visual Studio 2008.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 6pt 0cm 3pt 11.35pt"&gt;&lt;span&gt;&lt;font face="Verdana" size="2"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 6pt 0cm 3pt 11.35pt"&gt;&lt;font face="Verdana" size="2"&gt;There are issues, of course.&lt;span&gt;   As well as the absence of compiler support for LinQ, Visual Studio 2005 does not have access to various new project and file templates and tools that support the new version of the framework.   Developers may need to do more coding in Visual Studio 2005 than would be necessary in Visual Studio 2008.   This is often a small price to pay, however, in order to access the improvements in 3.5.    As an example, consider the new integration between WF and WCF, provided in the new System.WorkflowServices assembly.   The integration is provided via the new WorkflowServiceHost class and a couple of new activities.   Visual Studio 2008 has new template support for building workflow services, and comes with a very useful new WCF test harness.   However, exploiting this new functionality in Visual Studio 2005 is trivial.   Create a WF workflow library, add a reference to System.WorkflowServices and add the new activities to your tool box.   Finally, use the WCF Service template to add a service class to your project and you are just about in the same position as you would be in Visual Studio 2008 if you used the new Workflow Service project template.   You'll need to write a couple of lines of code to use WorkflowServiceHost to host your service, of course.   Off you go, and enjoy .NET 3.5.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117279"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117279" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/cyoung/aggbug/117279.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Charles Young</dc:creator>
            <guid>http://geekswithblogs.net/cyoung/archive/2007/12/01/117279.aspx</guid>
            <pubDate>Sat, 01 Dec 2007 11:23:21 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/cyoung/comments/117279.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/cyoung/archive/2007/12/01/117279.aspx#feedback</comments>
            <slash:comments>46</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/cyoung/comments/commentRss/117279.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/cyoung/services/trackbacks/117279.aspx</trackback:ping>
        </item>
        <item>
            <title>DebugView and the elusive 'Capture Global Win32' option</title>
            <link>http://geekswithblogs.net/cyoung/archive/2007/09/16/115390.aspx</link>
            <description>&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" size="2"&gt;Like most BizTalk Server developers I am addicted to the use of DebugView.   This, in case you are one of the three BizTalk developers out there who are still not aware of it, is a free utility written by the SysInternals people.   Microsoft bought SysInternals a while back, and the utility can now be downloaded from their web site at:&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;a href="http://www.microsoft.com/technet/sysinternals/utilities/debugview.mspx"&gt;&lt;font face="Verdana" size="2"&gt;http://www.microsoft.com/technet/sysinternals/utilities/debugview.mspx&lt;/font&gt;&lt;/a&gt;&lt;font face="Verdana" size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" size="2"&gt;DebugView provides a viewer for traces created using the Win32 OutputDebugString() API. You can liberally instrument your .NET code using calls to System.Diagnostics.Debug.Write&amp;lt;xxx&amp;gt; methods, then open up DebugView and run you code.   The output is nicely displayed in the DebugView console. For BizTalk developers, this is an indispensable tool because there is no way to single-step through XLANG/s expressions.   The Orchestration debugger is built on top of the orchestration engine, and is not a 'true' Win32 debugger.   It can only single-step through interactions between the orchestration and the orchestration engine which occur at a much coarser level of granularity than individual lines of XLANG/s code.&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" size="2"&gt;I've spent the last couple of weeks pretending to be an ASP.NET 2.0 developer.   The code I was writing does a fair amount of re-direction.   It supports a number of different log-in models based on the Forms Authentication model in ASP.NET 2.0, but integrated with a remote identity provider.   The code is 'proof of concept' stuff, and supports different ‘candidate’ approaches, including the ability to switch to local authentication in order to demonstrate the code in scenarios where we have no remote connectivity.   To begin with I (rather stupidly, in hindsight) was trying to develop using the new Web Site project type in Visual Studio.   Oh dear.   I needed to use SSL sessions to debug the code because we are using CardSpace.   You can't do this under the local web server.   I tried, without success, to debug my code under IIS, but found that, for some reason, I was unable to attach to IIS worker processes!   Then, I really came unstuck when ASP.NET completely lost the ability to debug.   It was creating pdb files OK, but one of them appeared to be corrupted somehow each time it was built (for example, no version number), and Visual Studio insisted that I had no symbols loaded, even though the Module window clearly showed that I did!&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" size="2"&gt;I gave up, and ported the code over to a Web Application project.   I still have problems.   Visual Studio currently reports a set of spurious build errors 'dynamically' while using the designer (these change dynamically over time even if I don't touch the keyboard - yes I mean it! I just sit there and stare at the screen for a minute or two and see the error messages change before my eyes), but then builds and publishes the application anyway.   It has lost the ability to see Master Pages if I use generated paths with the '~' specifier. It has also become hopelessly confused in regard to a custom control that I am using - a problem, incidentally, for which there are hundreds of hits in Google, but only one conclusion - 'tough - it's a long-standing bug - you can't fix it and there's no known workaround - rebuild your project from scratch'.   Apart from that, the Web Application works OK, and I can now debug my code smoothly under SSL sessions.   A good lesson learned.   I certainly won't use Web Site projects in future, and will try not to use ASP.NET unless I have to, until such time as Microsoft sees fit to stabilise the design-time ASP.NET tools.&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" color="#ff0000" size="2"&gt;[&lt;strong&gt;Update&lt;/strong&gt;: I had another go at clearing the persistent "Unknown server tag" problem, which is the issue I reported above with the custom control.   I tried (yet again) a whole variety of approaches, including registering the control via the web.config file, rather than using the @Register directive.   I eventually hit on an approach which seemed to work.   I recompiled the control using a strong name.   I had tried this before, but when I GACd the assembly, I got a new error in which ASP.NET reported confusion at runtime over having two copies of the assembly (one in the ASP.NET TEMP folders and one in the GAC).   So this time, having encountered the same problem, I simply removed the control from the GAC (duh).   And suddenly I can use the control in the designer again!   As far as I am aware, this is the only change I have made (of course, you have to update the assembly name in the @Register directive to the strong name).   I note that Visual Studio automatically updates an assembly reference for the control in the web.config file.   Of course, everything was originally working fine for some time with a simple-named version of the same control (I haven't changed the control code in any way), so I fully expect everything to break down again for no apparant reason].&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" color="#ff0000" size="2"&gt;[&lt;strong&gt;Update 2&lt;/strong&gt;: Oh yes.  As predicted.   Within an hour or two the designer magically lost its ability to handle my strongly-named version of the control.   How do ASP.NET developers cope with this day in, day out?]&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" size="2"&gt;The point of this, apart from letting off steam about the general flakiness of ASP.NET 2.0 under Visual Studio 2005 SP1 (it's horrible), is that while developing using the Web Site, I needed to use DebugView quite extensively.   Even now, it is of some use due to the re-direction.   I can trace my code in one page, even though this page redirects to another so that I can't see my trace output using the built-in tracing features of ASP.NET.   DebugView shows me what I need to see, as long as I remember to place '#define DEBUG' statements in my 'CodeBehind' files. &lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" size="2"&gt;I ran into a problem with DebugView which I have seen before.   I've been trying to research it to come up with a definitive answer, but I don't know the underlying cause - just the symptoms.   My problem is that my ASP.NET code runs in a different session to the desktop.   This means that the output does not appear in DebugView unless I enable the 'Capture Global Win32' option.   However, this option was not available in DebugView.&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" size="2"&gt;At this point, I should say that I am developing on Windows Server 2003 R2.   I run Vista on my notebook.   When I open the same version of DebugView on my Vista notebook, I can see the 'Capture Global Win32' option.   However, I can't see it when I run DebugView on the Windows Server 2003 box.&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" size="2"&gt;I was tearing my hair out over this one, and it isn't the first time I have run into this problem.   I spent some time trying to find an answer on Google.   I didn't turn anything up, but somewhere I read something about remote connections.   I had a thought.   I powered up a Remote Desktop session to my own development box and then opened DebugView.   Success!   The 'Capture Global Win32' option appeared, and once selected, DebugView started happily displaying the output from my ASP.NET application.&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" size="2"&gt;This approach cannot be used on XP (or, I think, Vista) because, even with SP2, XP does not support concurrent remote desktop sessions.   Apparently, Microsoft was going to lift this restriction at some point, but then decided not to.   As I say, when running DebugView under Vista, I don't get the problem anyway.&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" size="2"&gt;I experimented further with DebugView by setting up a 'client' instance (surely this should be termed a 'server' instance') and then connecting to this on the same machine.   In my first attempt, this appeared to work, but when I tried to reproduce the approach the following day, it failed.   The Remote Desktop approach works every time though.&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" size="2"&gt;As I say, I don't currently have an explanation.   I know, from Googling, that there are some interesting issues when using OutputDebugString regarding the permission set granted to an underlying Mutex.   Maybe the behaviour of DebugView has something to do with this.   Maybe the explanation is simpler.   It may have something to do with having another registered debugger in the same Windows session.   I'm not sure.   What I do know is that remoting into your own desktop on Windows Server 2003 works very nicely indeed.&lt;/font&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115390"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115390" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/cyoung/aggbug/115390.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Charles Young</dc:creator>
            <guid>http://geekswithblogs.net/cyoung/archive/2007/09/16/115390.aspx</guid>
            <pubDate>Sun, 16 Sep 2007 13:24:45 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/cyoung/comments/115390.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/cyoung/archive/2007/09/16/115390.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/cyoung/comments/commentRss/115390.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/cyoung/services/trackbacks/115390.aspx</trackback:ping>
        </item>
        <item>
            <title>WF Rules and MS BRE - Comparing Performance</title>
            <link>http://geekswithblogs.net/cyoung/archive/2007/08/14/114647.aspx</link>
            <description>&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" size="2"&gt;I’ve been asked a few times how the performance of WF (Windows Workflow Foundation) Rules compares with that of the Microsoft Business Rules Engine (MS BRE).   Having done no testing, I could only guess at the answer.   &lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" size="2"&gt;I’ve now undertaken some initial performance testing to compare WF and MS BRE, and decided to publish the results.    You can read my write-up of the results &lt;/font&gt;&lt;a href="http://geekswithblogs.net/cyoung/archive/2007/08/12/114597.aspx"&gt;&lt;font face="Verdana" size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font face="Verdana" size="2"&gt;.&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;font face="Verdana" size="2"&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0cm 0cm 10pt"&gt;&lt;a href="http://geekswithblogs.net/cyoung/archive/2007/08/12/114597.aspx"&gt;&lt;font face="Verdana" size="2"&gt;http://geekswithblogs.net/cyoung/archive/2007/08/12/114597.aspx&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=114647"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=114647" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/cyoung/aggbug/114647.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Charles Young</dc:creator>
            <guid>http://geekswithblogs.net/cyoung/archive/2007/08/14/114647.aspx</guid>
            <pubDate>Tue, 14 Aug 2007 17:27:29 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/cyoung/comments/114647.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/cyoung/archive/2007/08/14/114647.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/cyoung/comments/commentRss/114647.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/cyoung/services/trackbacks/114647.aspx</trackback:ping>
        </item>
        <item>
            <title>BizTalk Server or WF for rules and tracking?</title>
            <link>http://geekswithblogs.net/cyoung/archive/2007/07/19/114062.aspx</link>
            <description>&lt;p&gt;&lt;font face="Verdana" size="2"&gt;I got an email today requesting help in deciding the appropriate selection of rule processing technology for a workflow application.&lt;span style="mso-spacerun: yes"&gt;   &lt;/span&gt;I’ve got requests like this before, so I’ve decided to post a reply publically.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" size="2"&gt;&lt;a href="http://geekswithblogs.net/cyoung/archive/2007/07/19/114061.aspx"&gt;http://geekswithblogs.net/cyoung/archive/2007/07/19/114061.aspx&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=114062"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=114062" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/cyoung/aggbug/114062.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Charles Young</dc:creator>
            <guid>http://geekswithblogs.net/cyoung/archive/2007/07/19/114062.aspx</guid>
            <pubDate>Thu, 19 Jul 2007 19:13:27 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/cyoung/comments/114062.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/cyoung/archive/2007/07/19/114062.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/cyoung/comments/commentRss/114062.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/cyoung/services/trackbacks/114062.aspx</trackback:ping>
        </item>
        <item>
            <title>BizTalk Server 2006: Auto-Construction of Orchestration Variables Considered Harmful</title>
            <link>http://geekswithblogs.net/cyoung/archive/2007/02/04/105432.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Don't get me wrong.&amp;nbsp;&amp;nbsp; I think the world of BizTalk as a product.&amp;nbsp;&amp;nbsp; But, like any complex piece of software, there are one or two things that annoy me.&amp;nbsp; I blogged a few weeks ago about the xpath() function, and the way BizTalk decides how to initialise an internal XmlSerializer instance based on the type of the variable to which you assign the xpath() result.&amp;nbsp; If you type your variable inappropriately, your code breaks at run time with a problem that is difficult to diagnose.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Another orchestration issue which caused me some suffering a few days ago is the auto-construction of orchestration variables.&amp;nbsp;&amp;nbsp; If you create an orchestration variable of a type that has a default constructor, BizTalk will, by default, auto-construct your variable using that constructor.&amp;nbsp;&amp;nbsp; I've never really understood the logic of this design.&amp;nbsp;&amp;nbsp; First, it seems a little inconsistent.&amp;nbsp; Some types don't have a default constructor, and hence cannot be auto-constructed by BizTalk.&amp;nbsp;&amp;nbsp; Second, the fact that auto-construction, where applicable, is set as the default behaviour is just downright dangerous.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Here is a real-world scenario.&amp;nbsp;&amp;nbsp; As always, you are up against a tight deadline to complete your work.&amp;nbsp;&amp;nbsp; Everything is going well, but you have been asked to add a small and simple piece of functionality to a particular orchestration which, hitherto, has been working properly.&amp;nbsp;&amp;nbsp; You drop a loop shape into the orchestration and set it up to enumerate some values provided by a custom class.&amp;nbsp;&amp;nbsp; Disaster.&amp;nbsp;&amp;nbsp; When you run the orchestration, strange behaviour is observed.&amp;nbsp;&amp;nbsp; An instance of the orchestration is activated, but then...nothing.&amp;nbsp;&amp;nbsp; The very first orchestration shape is an expression whose first line is a trace.&amp;nbsp;&amp;nbsp; This line never gets executed.&amp;nbsp;&amp;nbsp; Worse than that, the BizTalk process has all but locked up.&amp;nbsp;&amp;nbsp; The CPU is maxed out at 100% and it takes a couple of minutes of patient waiting to coax the host instance into stopping.&amp;nbsp;&amp;nbsp; You then find it virtually impossible to get rid of the running orchestration instance.&amp;nbsp;&amp;nbsp; In fact, there are two service instances involved.&amp;nbsp; The orchestration’s parent (it is a 'called' orchestration) receives a message via a published web service, and you have to stop the isolated host's IIS app pool in order to terminate the EPM (messaging) service instance associated with the isolated host.&amp;nbsp;&amp;nbsp; If you try also to suspend or terminate the orchestration service instance, the action is marked as pending.&amp;nbsp;&amp;nbsp; If you restart the host instance in order to complete the pending action, the process just locks up again.&amp;nbsp; Because you can't get rid of the active orchestration service instance, you can't redeploy a new version of your BizTalk code.&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Progress slows to a crawl.&amp;nbsp; In desperation you eventually resort to manually truncating various BizTalk message box tables in order to recover from the lock-up (not a recommended strategy, though very effective).&amp;nbsp; You can't trace or debug your orchestration code because none of it appears to ever run.&amp;nbsp;&amp;nbsp; You remove the loop that caused the problem and redeploy, and still you code doesn't work.&amp;nbsp;&amp;nbsp; Hours start to pass while your blood pressure slowly rises, and your deadlines come and go.&amp;nbsp; You try everything you can think of, including recreating your orchestration from scratch, testing it carefully at each stage.&amp;nbsp; Everything is fine until you recreate that darned loop.&amp;nbsp; Again, BizTalk locks up.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The best thing to do in these situations is to walk away from the problem for a while.&amp;nbsp;&amp;nbsp; With a little e&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi"&gt;ncouragement &lt;/SPAN&gt;from the project manager, this is what I did.&amp;nbsp;&amp;nbsp; The functionality represented by the loop was important, but I could carry on making progress without it for a while.&amp;nbsp; Progress is duly made, and then, a few hours later, walking down the street after the day's work is done, my mind turns back naturally to the problem...and bingo (as we say here in the UK)...a moment of clarity and enlightenment.&amp;nbsp;&amp;nbsp; I know in an instant what is wrong.&amp;nbsp; Next morning, it takes me about a minute to locate and fix the bug.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;My loop uses a custom class.&amp;nbsp;&amp;nbsp; I created a variable at the outer scope of the orchestration to hold an instance of this class.&amp;nbsp;&amp;nbsp; The default constructor invokes some code that contains a loop.&amp;nbsp;&amp;nbsp; I had managed to write that loop so that it never hit the 'break' statement.&amp;nbsp;&amp;nbsp; So obvious.&amp;nbsp;&amp;nbsp; So basic.&amp;nbsp;&amp;nbsp; As soon as BizTalk instantiated my orchestration, it ran the code to auto-construct my custom class.&amp;nbsp; The construction code hit the never-ending loop and everything locked up.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;In future, I intend to adopt a new BizTalk coding standard.&amp;nbsp;&amp;nbsp; I shall rigorously switch off auto-construction for all my orchestration variables, and include explicit code in expression shapes to construct objects.&amp;nbsp; This kind of bug takes a minute or so to diagnose when using a language like C#.&amp;nbsp;&amp;nbsp; In BizTalk orchestrations, it becomes opaque and very difficult to find.&amp;nbsp;&amp;nbsp; Worse than that, BizTalk does not provide sufficient facilities for easy recovery from the worst effects of auto-construction.&amp;nbsp;&amp;nbsp; This is a feature too far.&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=105432"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=105432" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/cyoung/aggbug/105432.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Charles Young</dc:creator>
            <guid>http://geekswithblogs.net/cyoung/archive/2007/02/04/105432.aspx</guid>
            <pubDate>Sun, 04 Feb 2007 20:27:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/cyoung/comments/105432.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/cyoung/archive/2007/02/04/105432.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/cyoung/comments/commentRss/105432.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/cyoung/services/trackbacks/105432.aspx</trackback:ping>
        </item>
        <item>
            <title>BizTalk Server 2006: An xpath() Function problem</title>
            <link>http://geekswithblogs.net/cyoung/archive/2006/12/12/100981.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I spent a couple of hours today looking at the problem we encountered yesterday with the xpath() function in BizTalk.&amp;nbsp;&amp;nbsp;&amp;nbsp; We were attempting to use an XPath to extract the value of a nested element and assign it to a string variable.&amp;nbsp;&amp;nbsp; The nested element (&amp;lt;Direction&amp;gt;) was in the global (anonymous) namespace, but was a child of an element in a named namespace.&amp;nbsp;&amp;nbsp; The code failed on XmlSerializer de-serialisation with an error saying "&amp;lt;Direction xmlns=''&amp;gt; not expected".&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;At first, I strongly suspected that the problem was due to the use of the anonymous namespace, especially as the element was defined in a schema that was then imported into the message schema.&amp;nbsp;&amp;nbsp; Both schemas had the 'Element FormDefault' attribute set to default (unqualified), and we had ended up with a horrible interleaved mess of elements, some of which were in defined namespaces, whilst others were in the global namespace.&amp;nbsp;&amp;nbsp; Always, always set Element FormDefault to 'Qualified' in your schemas, unless you have a really good reason not to.&amp;nbsp;&amp;nbsp; We are now in the process of changing all our schemas to eliminate the use of global namespaces.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;After a while, I convinced myself that there was a problem with the .NET XmlSerializer, especially after reading a number of news group threads on the Internet.&amp;nbsp;&amp;nbsp; From what I read, it seemed that the XmlSerializer might have problems with "xmlns=''" declarations. To prove the point, I wrote a little code to reproduce the issue.&amp;nbsp;&amp;nbsp; Unfortunately, however, the XmlSerializer worked perfectly, whatever I did.&amp;nbsp; It seems that it has no issues at all with "xmlns=''".&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I then spent some time with Reflector, digging into the BizTalk code to see what it was doing, and eventually I discovered the problem...and it was all our fault!!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;We had a line of code&amp;nbsp;in the orchestration that attempted to use the BizTalk xpath() function to return the value held in the &amp;lt;Direction&amp;gt; element and assign it to a string variable.&amp;nbsp;&amp;nbsp;&amp;nbsp; The only problem was that the XPath was addressing the &amp;lt;Direction&amp;gt; node, and not its contents.&amp;nbsp;&amp;nbsp; The XPath processor uses XML DOM internally, and expressions return XML nodes or node sets.&amp;nbsp;&amp;nbsp; In our case, the XPath we used was returning an XmlElement node from our XML message.&amp;nbsp;&amp;nbsp; We were trying to assign this to a string variable (doh)!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;This very basic XPath error was made opaque by the fact&amp;nbsp;that we got no compile-time error, but instead suffered an run-time exception thrown by&amp;nbsp;the XmlSerializer class.&amp;nbsp;&amp;nbsp; You might reasonably expect that the exception would indicate some kind of type mismatch or cast failure.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Instead, we got a general-purpose XmlSerializer exception statibg that the XML content was unexpected.&amp;nbsp;&amp;nbsp; The reason for this becomes clear when we looked a little deeper into what is happening when we call the xpath function.&amp;nbsp;&amp;nbsp; BizTalk generates C# code for the line that calls the xpath function.&amp;nbsp;&amp;nbsp; The generated code calls a method to which it&amp;nbsp;passes the Type of the variable to which the result of the method will be assigned.&amp;nbsp;&amp;nbsp; This Type is used to initialise an instance of XmlSerializer used internally by BizTalk.&amp;nbsp;&amp;nbsp;&amp;nbsp;In our case, we ended up with an instance of XmlSerializer that attempted to de-serialise an XmlElement (addressed by the XPath) as a string object.&amp;nbsp;&amp;nbsp; This, of course,&amp;nbsp;didn't work, and the XmlSerializer returned&amp;nbsp;an exception saying that the XmlElement 'was not expected'.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The XmlSerializer object is used to deserialise XML content obtained using XPathNavigator&amp;nbsp;and XmlNodeReader.&amp;nbsp;&amp;nbsp; In a reversal of the principle of strong typing, BizTalk's XLang/s langauge&amp;nbsp;effectively 'trusts' the developer to select the right type of variable to hold the results of the xpath() function.&amp;nbsp;&amp;nbsp; If the developer gets this wrong (as we did), the code blindly attempts to perform de-serialisation to the incorrect type, and fails at run time.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The best fix in our case was simply to extend the end of the XPath with '/text()'.&amp;nbsp;&amp;nbsp; This returns the text node contained in the &amp;lt;Direction&amp;gt; node (XML DOM sees the text node as a nested node).&amp;nbsp;&amp;nbsp; This nicely de-serialises to a string.&amp;nbsp;&amp;nbsp;&amp;nbsp; Another option would be to retain the XPath as is, but assign the result to an XmlElement variable, and then extract the inner text.&amp;nbsp;&amp;nbsp; This is less direct, and may require an additional atomic scope because XmlElement is not serialisable.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;So, the problem was nothing to do with the use of anonymous namespaces or the .NET XmlSerializer.&amp;nbsp;&amp;nbsp; It was a basic logical error in our own code that took ages to spot due to the exception that was raised.&amp;nbsp;&amp;nbsp; If you use the xpath function and get an "&amp;lt;xxxxx xmlns=''&amp;gt; not expected" exception, check your XPath to see what it is actually returning, and the variable you are assigning the results to.&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=100981"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=100981" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/cyoung/aggbug/100981.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Charles Young</dc:creator>
            <guid>http://geekswithblogs.net/cyoung/archive/2006/12/12/100981.aspx</guid>
            <pubDate>Tue, 12 Dec 2006 23:19:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/cyoung/comments/100981.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/cyoung/archive/2006/12/12/100981.aspx#feedback</comments>
            <slash:comments>15</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/cyoung/comments/commentRss/100981.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/cyoung/services/trackbacks/100981.aspx</trackback:ping>
        </item>
        <item>
            <title>BizTalk Server 2006: Using .NET Classes for Orchestration Message Types</title>
            <link>http://geekswithblogs.net/cyoung/archive/2006/11/29/99466.aspx</link>
            <description>&lt;P&gt;&lt;FONT color=#000000&gt;&lt;FONT face=Verdana size=2&gt;I had some discussion today with Christof Claessens about the merits of using .NET classes as orchestration message types in BizTalk Server 2006.&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;A href="http://geekswithblogs.net/cyoung/articles/99464.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Here&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; are some of the reasons I came up with, and also some of the issues.&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://geekswithblogs.net/cyoung/articles/99464.aspx"&gt;&lt;FONT face=Verdana size=2&gt;http://geekswithblogs.net/cyoung/articles/99464.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=99466"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=99466" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/cyoung/aggbug/99466.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Charles Young</dc:creator>
            <guid>http://geekswithblogs.net/cyoung/archive/2006/11/29/99466.aspx</guid>
            <pubDate>Wed, 29 Nov 2006 17:34:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/cyoung/comments/99466.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/cyoung/archive/2006/11/29/99466.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/cyoung/comments/commentRss/99466.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/cyoung/services/trackbacks/99466.aspx</trackback:ping>
        </item>
        <item>
            <title>BizTalk 2006: Accessing flat file content in orchestration messages</title>
            <link>http://geekswithblogs.net/cyoung/archive/2006/07/11/84736.aspx</link>
            <description>&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=2&gt;&lt;SPAN lang=EN-GB&gt;I was recently asked if I would provide some insight into solving a BizTalk&amp;nbsp;problem.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It's some time since I have blogged on BizTalk in depth, and the question gave me an excuse to write something on my favourite integration tool.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Advanced BizTalk developers will know all about this subject, but if your are fairly new to BizTalk, this might be of help.&lt;/SPAN&gt;&lt;SPAN lang=EN-GB&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;SPAN lang=EN-GB&gt;&lt;FONT face=Arial size=2&gt;In the given scenario, data stored in flat files in being delivered to the BizTalk message box via a pass-through pipeline.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;An orchestration subscribes to these messages and creates XML output.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Each time a file is processed, the developer wants to 'dump' the contents of the flat file into an element in the output.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Other information, including the file name, is also included in the XML output.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;SPAN lang=EN-GB&gt;&lt;FONT face=Arial size=2&gt;The question I was asked was 'how do you access the content of the flat file messge in an orchestration'.&amp;nbsp;&amp;nbsp; The answer is fairly straight-forward, but there are things to learn on the way...&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;SPAN lang=EN-GB&gt;&lt;FONT face=Arial size=2&gt;Read on at &lt;/FONT&gt;&lt;A id=Editor_Edit_hlEntryLink title="view: BizTalk 2006: Accessing flat file content in orchestration messages" href="/cyoung/articles/84735.aspx" target=_blank&gt;&lt;FONT face=Arial size=2&gt;http://geekswithblogs.net/cyoung/articles/84735.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=84736"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=84736" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/cyoung/aggbug/84736.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Charles Young</dc:creator>
            <guid>http://geekswithblogs.net/cyoung/archive/2006/07/11/84736.aspx</guid>
            <pubDate>Tue, 11 Jul 2006 14:27:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/cyoung/comments/84736.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/cyoung/archive/2006/07/11/84736.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/cyoung/comments/commentRss/84736.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/cyoung/services/trackbacks/84736.aspx</trackback:ping>
        </item>
    </channel>
</rss>