<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 2006</title>
        <link>http://geekswithblogs.net/nsthompson/category/5123.aspx</link>
        <description>BizTalk Server 2006</description>
        <language>en-US</language>
        <copyright>Neil Thompson</copyright>
        <managingEditor>n.thompson@cgi.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Should you cluster the BizTalk 2006 Master Secret Server?</title>
            <link>http://geekswithblogs.net/nsthompson/archive/2006/12/21/ShouldIClusterMasterSecret.aspx</link>
            <description>&lt;P&gt;In short, YES you should cluster the service if possible.&lt;/P&gt;
&lt;P&gt;I have seen lots of posts on this and I think that some recent problems with SSO clustering (see &lt;A href="http://geekswithblogs.net/nsthompson/archive/2006/12/21/SSOFailoverFails.aspx"&gt;my post here&lt;/A&gt; for fixes) may have caused people to shy away from it.&amp;nbsp; If you are running SQL on a cluster, then you may as well tack on another clustered service and have that much more protection. If you are not running SQL in a cluster then clustering the Master Secret Server will probably not make much of a difference for you!&lt;/P&gt;
&lt;P&gt;If you have a reliable cluster available and it seems to be managed well, use it and cluster the Master Secret Server. This is still the recommendation that you will get from Microsoft and still the easiest way to ensure that a hardware failure will not bring your BizTalk server to its knees.&amp;nbsp; I realize that the manual process involved in bringing up another master secret server in case of a failure is simple and short, but it is still a manual process. This means that somebody has to notice the problem, diagnose the problem, and fix the problem. All of which turns into downtime in your production environment.&lt;/P&gt;
&lt;P&gt;I have seen people take a lot of time to notice and diagnose the problem in the past, so even if the fix is a quick one, you may still have a few hours of "head scratching" time before the production support team realizes what's happening.&amp;nbsp; Whereas if you have the master secret clustered, you will have a breif pause during the failover, then smooth sailing.&amp;nbsp; Chances are that your apps will not be affected at all (unless you happen to be restarting your host instance at the precise instant the failover takes place, in which case you will be unable to start them properly the first time and will have to issue the restart again)&lt;/P&gt;
&lt;P&gt;I absolutely, definitely, 100% recommend that you take the time to cluster your Master Secret Server. (Just don't enable the registry replication if you happen to get an old version of the MSS clustering docs)&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=101805"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=101805" 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/nsthompson/aggbug/101805.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Thompson</dc:creator>
            <guid>http://geekswithblogs.net/nsthompson/archive/2006/12/21/ShouldIClusterMasterSecret.aspx</guid>
            <pubDate>Thu, 21 Dec 2006 14:15:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nsthompson/comments/101805.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nsthompson/archive/2006/12/21/ShouldIClusterMasterSecret.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nsthompson/comments/commentRss/101805.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nsthompson/services/trackbacks/101805.aspx</trackback:ping>
        </item>
        <item>
            <title>SSO Master Secret Server does not start after cluster failover</title>
            <link>http://geekswithblogs.net/nsthompson/archive/2006/12/21/SSOFailoverFails.aspx</link>
            <description>&lt;P&gt;&lt;FONT color=#ff0000&gt;&lt;EM&gt;This post contains instructions about modifying the registry. This is inherently risky and this post is provided AS-IS without warranty of any kind.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I recently resolved this issue for a client but I suspect that many people have it due to some incorrect documentation regarding the installation of a clustered Master Secret Server.&lt;/P&gt;
&lt;P&gt;&lt;FONT size=4&gt;&lt;STRONG&gt;The Problem&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;SSO Master Secret server fails to start after failing over to second cluster node.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size=4&gt;Event Logs&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;---------------------------------------------------------------------------------&lt;BR&gt;Source: ENTSSO&lt;BR&gt;EventID: 10565&lt;BR&gt;Description: The secret could not be loaded from the registry. The service account for the SSO service may have been changed or the secret may be corrupted. Restore the secret from a backup file.&lt;BR&gt;---------------------------------------------------------------------------------&lt;BR&gt;Source: ENTSSO&lt;BR&gt;EventID: 10521&lt;BR&gt;Description: Could not load secrets from the registry of the master secret server.&lt;BR&gt;---------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&lt;FONT size=4&gt;&lt;STRONG&gt;Theory 1&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Perhaps the master secret was not installed on this second node.&amp;nbsp; So I dig out the Master Secret from the secure file share, and run the following command in command prompt from the Enterprise Single Sign-On directory:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;ssoconfig -restoresecret &amp;lt;keyname&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;The command completes, I go to cluster administrator, take the ENTSSO service offline, bring it back online and voila! It starts fine. End of problem right? WRONG?&lt;/LI&gt;
&lt;LI&gt;Just to be thorough,&amp;nbsp;I fail it back over to node1 of the cluster (WHERE IT FAILS!). Now node1 exhibits the same behaviour as node2 did originally.&lt;/LI&gt;
&lt;LI&gt;Then I restore they key to node1 and node2 has the same problem it had in the first place.&lt;/LI&gt;
&lt;LI&gt;I scratch my head&lt;/LI&gt;
&lt;LI&gt;I call MS PSS (always a good idea when you're not sure)&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size=4&gt;Pause for Thoughts&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Couldn't be the key, because the node that has it restored begins to work and both nodes have it&lt;/LI&gt;
&lt;LI&gt;Couldn't be the database because one node always works&lt;/LI&gt;
&lt;LI&gt;Couldn't be the service account because one node always works&lt;/LI&gt;
&lt;LI&gt;Each node can operate correctly so there is no defect specific to the node&lt;/LI&gt;
&lt;LI&gt;Why does restoring the key on one node break the other, after all it's just a REGISTRY KEY (AHA!)&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size=4&gt;Theory 2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The registry replication configured on the ENTSSO service in the cluster definition has a domino affect and somehow messes up the registry on whatever node did not just have the key restored. If I disable that, and cleanup the registies, maybe SSO will&amp;nbsp;failover properly.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;FONT color=#006400 size=4&gt;&lt;STRONG&gt;Solution&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT color=#006400&gt;Backup keys &lt;FONT face="Courier New"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ENTSSO\SSOSS&lt;/FONT&gt; from both nodes (just in case)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color=#006400&gt;In cluster administrator, remove registry replication for that same key on the ENTSSO "Generic Service"&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color=#006400&gt;Delete keys &lt;FONT face="Courier New"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ENTSSO\SSOSS&lt;/FONT&gt; from both nodes (carefully)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color=#006400&gt;Restart both nodes (perhaps not necessary)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color=#006400&gt;Restore master secret to active node, then failover to other node&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color=#006400&gt;Restore master secret to this node as well.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color=#006400&gt;Problem solved (test with multiple failovers to be sure)&lt;BR&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;EM&gt;Special thanks to Somu J. from MS PSS for the assistance on this problem.&lt;/EM&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=101800"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=101800" 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/nsthompson/aggbug/101800.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Thompson</dc:creator>
            <guid>http://geekswithblogs.net/nsthompson/archive/2006/12/21/SSOFailoverFails.aspx</guid>
            <pubDate>Thu, 21 Dec 2006 13:30:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nsthompson/comments/101800.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nsthompson/archive/2006/12/21/SSOFailoverFails.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nsthompson/comments/commentRss/101800.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nsthompson/services/trackbacks/101800.aspx</trackback:ping>
        </item>
        <item>
            <title>Notepad Grows Up</title>
            <link>http://geekswithblogs.net/nsthompson/archive/2006/12/09/XmlNotepad2007.aspx</link>
            <description>&lt;P&gt;Now that notepad is 20+ years old I guess Microsoft decided to beef it up a little.&amp;nbsp; XML Notepad 2007 is the new kid on the block and it is a nice little tool.&amp;nbsp; I will probably keep on using XmlSpy and the BizTalk Editor for schema creation, but I'll give a go at using XML Notepad to create those pesky instance documents for test submissions to my orchestrations.&lt;/P&gt;
&lt;P&gt;It allows inplace editing of the xml document, it seems to be aware of enumeration values (always nice) and gives you a dropdown to select.&amp;nbsp; It also has date inputs which have always been on my wish list.&amp;nbsp; It also seems to have XSL abilities which (maybe) I could use to test biztalk maps (not the ones with scripts of course) on the XML instances that&amp;nbsp; I can whip up from this little tool&lt;/P&gt;
&lt;P&gt;You can download XML Notepad 2007 &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=72d6aa49-787d-4118-ba5f-4f30fe913628&amp;amp;DisplayLang=en"&gt;here.&lt;/A&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=100750"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=100750" 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/nsthompson/aggbug/100750.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Thompson</dc:creator>
            <guid>http://geekswithblogs.net/nsthompson/archive/2006/12/09/XmlNotepad2007.aspx</guid>
            <pubDate>Sat, 09 Dec 2006 15:23:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nsthompson/comments/100750.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nsthompson/archive/2006/12/09/XmlNotepad2007.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nsthompson/comments/commentRss/100750.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nsthompson/services/trackbacks/100750.aspx</trackback:ping>
        </item>
        <item>
            <title>Orchestrations fail to deploy due to binding errors</title>
            <link>http://geekswithblogs.net/nsthompson/archive/2006/10/12/BindingFailureBlocksOrchestrationDeployment.aspx</link>
            <description>&lt;P&gt;BizTalk 2006 seems to have a deployment quirk that has been no small source of frustration for me.&amp;nbsp; I don't know if this is widespread or if I just have a bad install but it seems that whenever I change a port (add a port or remove a port) I get an error similar to the following when I try to deploy that assembly from Visual Studio,&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;Error 26 Failed to add resource(s). Change requests failed for some resources. BizTalkAssemblyResourceManager failed to complete end type change request. Failed to update binding information. Could not enlist orchestration 'Orchestration.UpdateRequestStatus,Orchestration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f96e91b6b75bb727'. Could not enlist orchestration 'Orchestration.UpdateRequestStatus'. All orchestration ports must be bound and the host must be set.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I've done some reading and a lot of thinking and all I can come up with is that BizTalk must be cacheing the binding information and reapplying it when I redeploy the assemblies. The part of it that burns me is that the DEPLOYMENT of the orchestrations fails because of a binding error. If you think about that for a second you realise that you can not change the binding information for assemblies that are not deployed so you get stuck.&lt;/P&gt;
&lt;P&gt;I have not been able to find references to the binding cache, though my research is admittedly limited.&amp;nbsp; On the hunch that this cache exists and is the source of my problem I tried incrementing the version on my orchestration assembly so BizTalk would ignore its previously cached info (its a new assembly version after all) and voila! It deployed my assemblies without complaining.&lt;/P&gt;
&lt;P&gt;Two possible solutions to this that i know of are:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Change version (or key I suppose) on the orchestration assemblies 
&lt;LI&gt;Deploy the orchestration assembly by adding it as a resource to the appropriate app in the biztalk admin tool&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=93893"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=93893" 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/nsthompson/aggbug/93893.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Thompson</dc:creator>
            <guid>http://geekswithblogs.net/nsthompson/archive/2006/10/12/BindingFailureBlocksOrchestrationDeployment.aspx</guid>
            <pubDate>Thu, 12 Oct 2006 13:39:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nsthompson/comments/93893.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nsthompson/archive/2006/10/12/BindingFailureBlocksOrchestrationDeployment.aspx#feedback</comments>
            <slash:comments>11</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nsthompson/comments/commentRss/93893.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nsthompson/services/trackbacks/93893.aspx</trackback:ping>
        </item>
        <item>
            <title>BizTalk 2006 FailedMessage Routing</title>
            <link>http://geekswithblogs.net/nsthompson/archive/2006/10/11/BTS2K6_FailedMessageRouting.aspx</link>
            <description>&lt;P&gt;&lt;FONT color=#ff0000&gt;There is no sample for this, but if I get enough requests (say five or so) I'll create one and post it.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I decided to whip up a quick prototype of FailedMessage subscription in BizTalk 2006 and I ended up hitting a couple of bumps in the road on my first shot.&amp;nbsp; I'm the kind that does not stop and ask for directions, nor do I take the time to look at samples.&amp;nbsp;&amp;nbsp; I try to do it on my own, and failing that, I'll hit the blogs.&amp;nbsp; All of that with a couple of trial and error sessions produced the following notes that I will use when trying this again:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Generating a FailedMessage&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Generating a failed message is easy.&amp;nbsp; Just submit a schema type that you are not looking for in any of your artifacts, or just unenlist the subscribers.&lt;/LI&gt;
&lt;LI&gt;Be sure to enable FailedMessageRouting on the port that is Receiving/Sending the erroreous message&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;When Using A SendPort subscriber to the FailedMessage&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Just create a send port and Set the filter criteria to &lt;FONT face="Courier New"&gt;ErrorReport.ErrorType == FailedMessage&lt;/FONT&gt; (do NOT put quotes around the failedmessage string)&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;When Using&amp;nbsp;an Orchestration&amp;nbsp;subscriber to the FailedMessage&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a receive port that is Direct Binding (the &amp;#8220;will be defined by filter expressions&amp;#8220; one)&lt;/LI&gt;
&lt;LI&gt;Have your activating receive shape with the &lt;FONT face="Courier New"&gt;ErrorReport.ErrorType == &amp;#8220;FailedMessage&amp;#8221;&lt;/FONT&gt; (put quotes around the failedmessage string)&lt;/LI&gt;
&lt;LI&gt;Your receive message type should just be Xmldocument&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Some Insights&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;There are a handful of other ErrorReport fields that will help you narrow your subscription&amp;nbsp;criteria if you wish I like the MessageType and ReceivePortName&lt;/LI&gt;
&lt;LI&gt;If your subscription to the FailedMessages is messed up, you will see TWO reports of failed message routing per message that you submit. I can only assume that this is because the attempt to route the failedMessage also fails.&amp;nbsp; If you want to explore this Disable/Enable FailedMessage routing on the port in question and see if it affects the number of reports you see.&lt;/LI&gt;
&lt;LI&gt;This is all about error handling so you have to assume that some pretty significant things are allready wrong. Depending on the stage at which you get the exception that causes the failedMessage, not all of the ErrorReport feilds will be helpful.&amp;nbsp; For instance, if the failure occurrs during the Xml[Dis]Assembly you can expect that the &lt;FONT face="Courier New"&gt;ErrorReport.MessageType&lt;/FONT&gt; will not be available.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Corollaries&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;This errorRouting mechanism also has the usefull behaviour of suppressing suspended messaging instances. I had a Solicit-Response call to an unreliable webservice [aren't they all], that would fail periodically.&amp;nbsp; When it did fail it would suspend the orch and the message instance.&amp;nbsp; When I resumed them, it would send a dup message (on from orch and one from message instance).&amp;nbsp; I'm sure there's a better way to solve this one (but I don't stop for directions remember) so we enabled ErrorRouting on the send port.&amp;nbsp; The consequence of this was that, on failures, only the orchestration was suspended. Now when I resume, I do not get duplicate messages and I do not have to remember to terminate the message instances.&lt;BR&gt;&lt;BR&gt;By the way, I fiddled with the SuspendAsNonResumable on this and it never seemd to work the way that the help file described.&amp;nbsp; There was a lot of sketchy behavior surrounding the resuming of a failed web call... but that can be another post.&lt;/LI&gt;&lt;/OL&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=93756"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=93756" 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/nsthompson/aggbug/93756.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Thompson</dc:creator>
            <guid>http://geekswithblogs.net/nsthompson/archive/2006/10/11/BTS2K6_FailedMessageRouting.aspx</guid>
            <pubDate>Wed, 11 Oct 2006 11:12:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nsthompson/comments/93756.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nsthompson/archive/2006/10/11/BTS2K6_FailedMessageRouting.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nsthompson/comments/commentRss/93756.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nsthompson/services/trackbacks/93756.aspx</trackback:ping>
        </item>
        <item>
            <title>Unable to create web reference from BizTalk project</title>
            <link>http://geekswithblogs.net/nsthompson/archive/2006/09/20/UnableToCreateWebReferenceFromBizTalkProject.aspx</link>
            <description>&lt;P&gt;When trying to create a web reference to an existing web service you may see one or both of the following messages&lt;/P&gt;
&lt;P&gt;Unabled to create web reference&lt;BR&gt;Failed to create web rererence&lt;/P&gt;
&lt;P&gt;If you see these messages (or similar messages), open up the source code (if you have it) from the service that you are trying to consume.&amp;nbsp; Examine the attributes of the webmethods. See if there is a &amp;#8220;Name&amp;#8221; attribute on the methods, and remove it if there is.&amp;nbsp; After you have done this you should be able to create the web reference from the BizTalk project.&lt;/P&gt;
&lt;P&gt;I'm not sure why this works, but it has worked for me many times. If you can't alter the attributes on the webservice, you can try using a C# class library to create the web reference for you and then call it indirectly. It's messy I know, but it works.&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=91705"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=91705" 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/nsthompson/aggbug/91705.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Thompson</dc:creator>
            <guid>http://geekswithblogs.net/nsthompson/archive/2006/09/20/UnableToCreateWebReferenceFromBizTalkProject.aspx</guid>
            <pubDate>Wed, 20 Sep 2006 13:04:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nsthompson/comments/91705.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nsthompson/archive/2006/09/20/UnableToCreateWebReferenceFromBizTalkProject.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nsthompson/comments/commentRss/91705.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nsthompson/services/trackbacks/91705.aspx</trackback:ping>
        </item>
        <item>
            <title>Using MOM 2005 to Recover ports on BizTalk 2006</title>
            <link>http://geekswithblogs.net/nsthompson/archive/2006/07/25/MomBizTalkSQLPortRecovery.aspx</link>
            <description>&lt;P&gt;This will be&amp;nbsp;a semi-fictitious case study. In using MOM 2005 to recover an errant SQL port.&amp;nbsp; This scenario is common and I've been asked about it a lot.&amp;nbsp; This approach is the simple meat and potatoes process. There are lots of areas that could be polished up but that kind of thing can clutter up an article with too much detail.&lt;/P&gt;
&lt;P&gt;The basic steps will be as follows:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Define a rule to detect the error condition 
&lt;LI&gt;Define a script to correct the error condition 
&lt;LI&gt;Wire up the script to the rule so that the rule cant trigger it.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Define a rule to detect the error condition&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;For whatever reason (network down, SQL down) the port was unable to commmunicate with SQL and BizTalk shut it down. This will create an event log entry similar to the following&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;Type:Error&lt;BR&gt;EventID:5649&lt;BR&gt;Source: BizTalk Server 2004/2006&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;The receive location "SQL://&amp;lt;sql name/info&amp;gt;" is shutting down. Details:"The error threshold has been exceeded. The receive location is shutting down."&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;You will setup a MOM Rule to detect this condtion. This is not a total MOM tutorial so I won't go over the details here, but the basic process is to create a new rule and use the criteria tab to specify as many details as possible from the above event log entry. Be sure the rule is using the application event log as a source.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Define a script to correct the error condition&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I would normally like to use managed code, but it is nice to remove dependencies from the .NET framework version (i.e. 2.0 might not be installed) and I also like being able to issue changes without having to recompile. This is good and bad for several reasons I don't want to get into.&amp;nbsp; The script that I use targets a specific port and tries to enable it.&amp;nbsp; The script (written in vbscript) is the following: (it is bacially a lift from the BizTalk SDK)&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR bgColor=#eeeeee&gt;
&lt;TD&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;'-------------------------------------------------------------------------&lt;BR&gt;'&lt;BR&gt;' WMI script to enable/disable the receive locations&lt;BR&gt;'&lt;BR&gt;'---------------------------------------------------&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;Option Explicit&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;EnableReceiveLocation "ReceivePort1", "ReceiveLocation1", "TRUE"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;Sub EnableReceiveLocation(strReceivePortName, strReceiveLocationName, sEnable)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'error handling is done by explicity checking the err object rather than using&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'the VB ON ERROR construct, so set to resume next on error.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; On Error Resume Next&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim objInstSet, objInst, strQuery&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'set up a WMI query to acquire a list of receive locations with the given Name and &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'ReceivePortName key values.&amp;nbsp; This should be a list of zero or one Receive Locations.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strQuery = "SELECT * FROM MSBTS_ReceiveLocation WHERE&amp;nbsp; ReceivePortName =""" &amp;amp; strReceivePortName &amp;amp; """AND Name =""" &amp;amp; strReceiveLocationName &amp;amp; """"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objInstSet = GetObject("Winmgmts:!root\MicrosoftBizTalkServer").ExecQuery(strQuery)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Check for error condition before continuing.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Err &amp;lt;&amp;gt; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintWMIErrorThenExit Err.Description, Err.Number&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'If Receive Location found, enable it, otherwise print error and end.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If objInstSet.Count &amp;gt; 0 then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each objInst in objInstSet&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Now enable /disable&amp;nbsp; receive location&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if sEnable= "TRUE" then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objInst.Enable&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objInst.Disable&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Err &amp;lt;&amp;gt; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintWMIErrorThenExit Err.Description, Err.Number&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if sEnable = "TRUE" then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 100&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 101&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Echo "No Receive Location was found matching that Name."&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;End Sub &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;'This subroutine deals with all errors using the WbemScripting object.&amp;nbsp; Error descriptions&lt;BR&gt;'are returned to the user by printing to the console.&lt;BR&gt;Sub&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintWMIErrorThenExit(strErrDesc, ErrNum)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; On Error Resume&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim&amp;nbsp;&amp;nbsp;&amp;nbsp; objWMIError&amp;nbsp;&amp;nbsp;&amp;nbsp; : Set objWMIError =&amp;nbsp;&amp;nbsp;&amp;nbsp; CreateObject("WbemScripting.SwbemLastError")&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If ( TypeName(objWMIError) = "Empty" ) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wscript.echo strErrDesc &amp;amp; " (HRESULT: "&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; Hex(ErrNum) &amp;amp; ")."&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wscript.echo objWMIError.Description &amp;amp; "(HRESULT: "&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; Hex(ErrNum) &amp;amp; ")."&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objWMIError&amp;nbsp;&amp;nbsp;&amp;nbsp; = nothing&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'bail out&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; wscript.quit 0&lt;BR&gt;End&amp;nbsp;&amp;nbsp;&amp;nbsp; Sub&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;Sub PrintUsage()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Echo "Usage:" + Chr(10) + Chr(10) + _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "cscript enabledisableallrecloc [enable/disable]" + _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chr(10) + "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Example to enable all receive locations: enabledisableallreclo enable "+ Chr(10) + Chr(10) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;End Sub&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Wire the script to the rule&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;You have to go to the Response tab of the rule and use the &amp;#8220;Execute command or batch file&amp;#8221; option. Assuming that you have copied your vbscript file to the %PROGRAM FILES% directory on your biztalk server you can execute the following as part of your response:&lt;/P&gt;
&lt;P&gt;Check the &amp;#8220;Use Windows command interpreter&amp;#8220; (if it is appropriate for your environment)&lt;BR&gt;Command line:cscript myscriptfile.vbs&lt;BR&gt;Initial Directory: %PROGRAMFILES%&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Common Mistakes&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;If your script works when executed locally but fails when triggered by MOM you probably have not set your Agent Action account . Go to the MOM adminstration console then go to Administration &amp;gt;&amp;gt; Computers &amp;gt;&amp;gt; Agent-Managed Computers. Right click on the machine in question and select &amp;#8220;Update Agent Settings&amp;#8220;. Choose a domain account that has the appropriate permissions (i.e. BizTalk Administrator/Operator for starting or stopping ports&amp;#8220; 
&lt;LI&gt;Consider the fact that this might start an infinite loop. Say SQL really is down.&amp;nbsp; Then the port goes down, then MOM starts it, then it goes back down, then MOM starts it etc.&amp;nbsp; Limit the retries with the Repeat count (look under advanced in the criteria tab for the rule).&amp;nbsp; If you really want to get fancy, use a regular expression to define different responses based on ranges&amp;nbsp;the retry count (i.e first time run&amp;nbsp;script immediately, 1-5 times run script every 10 minutes, &amp;gt; 5 times notify operators)&lt;/LI&gt;&lt;/OL&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=86227"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=86227" 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/nsthompson/aggbug/86227.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Thompson</dc:creator>
            <guid>http://geekswithblogs.net/nsthompson/archive/2006/07/25/MomBizTalkSQLPortRecovery.aspx</guid>
            <pubDate>Tue, 25 Jul 2006 18:40:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nsthompson/comments/86227.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nsthompson/archive/2006/07/25/MomBizTalkSQLPortRecovery.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nsthompson/comments/commentRss/86227.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nsthompson/services/trackbacks/86227.aspx</trackback:ping>
        </item>
        <item>
            <title>BizTalk 2006 SQL Adapter problem</title>
            <link>http://geekswithblogs.net/nsthompson/archive/2006/07/21/SqlAdapterErrorBizTalk2006.aspx</link>
            <description>&lt;P&gt;&lt;FONT color=#ff0000&gt;&lt;STRONG&gt;Breaking News&amp;nbsp;- July 29 2006&amp;nbsp;- Microsoft has released a supported hotfix for this issue but you must contact microsoft support services to obtain it.&amp;nbsp; The hotfix is supported but is not published on the support site because it has been classified as &amp;#8220;confidential&amp;#8220;. Refrence the KB article &lt;FONT face=Arial size=2&gt;918316&amp;nbsp;&lt;/FONT&gt; to obtain the fix&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Applications that worked well under BTS 2004 may experience problems under BTS 2006 because of an apparent problem in the new SQL Adapter.&amp;nbsp;&amp;nbsp; The error usually happens when you are expecting multiple rows/messages back from a SQL port.&amp;nbsp; The error looks something like the following.&lt;/P&gt;
&lt;TABLE bgColor=#cccccc&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;Exception type: WrongBodyPartException&lt;BR&gt;Source: Microsoft.XLANGs.BizTalk.Engine&lt;BR&gt;Target Site: Void ReadMessageState(Microsoft.XLANGs.Core.Envelope, Microsoft.XLANGs.BaseTypes.XLANGMessage)&lt;BR&gt;The following is a stack trace that identifies the location where the exception occured&lt;BR&gt;&amp;nbsp;&amp;nbsp; at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.ReadMessageState(Envelope env, XLANGMessage msg)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.ReceiveMessage(Int32 iOperation, Envelope env, XLANGMessage msg, Correlation[] initCorrelations, Context cxt, Segment s)&lt;BR&gt;at CB.MMAHH_File.Orchestrations.CBHHDownloadStore.segment2(StopConditions stopOn)&lt;BR&gt;at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception&amp;amp; exp)&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;There is a hotfix being developed for this issue, but it is currently (as of time of writing) in pre-release and you have to contact microsoft for it. The KB number to reference is 918316 (Which does not seem to show on the MS Site yet). The file name is 273599_ENU_i386_zip.exe.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I would just give you a link but that might do more harm than good becuase the hotfix is not fully tested.&amp;nbsp; If you desperately need it and MS just can't seem to get it to you, contact me and I'll see what I can do for you.&lt;U&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=85926"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=85926" 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/nsthompson/aggbug/85926.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Thompson</dc:creator>
            <guid>http://geekswithblogs.net/nsthompson/archive/2006/07/21/SqlAdapterErrorBizTalk2006.aspx</guid>
            <pubDate>Fri, 21 Jul 2006 18:34:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nsthompson/comments/85926.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nsthompson/archive/2006/07/21/SqlAdapterErrorBizTalk2006.aspx#feedback</comments>
            <slash:comments>10</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nsthompson/comments/commentRss/85926.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nsthompson/services/trackbacks/85926.aspx</trackback:ping>
        </item>
    </channel>
</rss>