<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</title>
        <link>http://geekswithblogs.net/paulp/category/3208.aspx</link>
        <description>BizTalk</description>
        <language>en-US</language>
        <copyright>Paul Petrov</copyright>
        <managingEditor>paul@petrovs.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>BizTalk 2006 Service Pack 1 Beta</title>
            <link>http://geekswithblogs.net/paulp/archive/2009/10/14/135460.aspx</link>
            <description>BizTalk 2006 R2 Service Pack 1 Beta 1 has been released. It's available through MS Technology Adoption Program at &lt;font face="Arial"&gt;&lt;a href="https://connect.microsoft.com/site/sitehome.aspx?SiteID=65"&gt;https://connect.microsoft.com/site/sitehome.aspx?SiteID=65&lt;/a&gt;.&lt;/font&gt; List of features &lt;font face="Arial"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee532481(BTS.20).aspx"&gt;http://msdn.microsoft.com/en-us/library/ee532481(BTS.20).aspx&lt;/a&gt;.&lt;/font&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135460"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135460" 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/paulp/aggbug/135460.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Paul Petrov</dc:creator>
            <guid>http://geekswithblogs.net/paulp/archive/2009/10/14/135460.aspx</guid>
            <pubDate>Wed, 14 Oct 2009 16:10:05 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/paulp/comments/135460.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/paulp/archive/2009/10/14/135460.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/paulp/comments/commentRss/135460.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/paulp/services/trackbacks/135460.aspx</trackback:ping>
        </item>
        <item>
            <title>How to save password for WCF Adapter in BizTalk binding file</title>
            <link>http://geekswithblogs.net/paulp/archive/2009/08/27/134354.aspx</link>
            <description>&lt;p&gt;Generally, it is not recommended to store passwords in the binding file and by default BizTalk administration UI clears it out when exporting binding to the xml file. But in development environment where you have automated continuous integration build and deployment not having password in the binding file will prevent application from starting and CI process fail. It can become tedious in staging deployments (TEST, UAT) as well, especially if you have multiple endpoints that use accounts with passwords. In such cases, having password for development account (hopefully not the same as production) in binding file can make life easier. &lt;/p&gt;
&lt;p&gt;To do that, export binding file after application is fully configured. Open it and locate section(s) with configuration for the ports/locations of interest. For example for the WCF receive location it will be in:&lt;/p&gt;
&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;&amp;lt;&lt;font face="Courier New"&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;ReceiveLocationTransportTypeData&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt;CustomProps&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;amp;gt;...&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;/&lt;font color="#000000" size="2"&gt;CustomProps&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;ReceiveLocationTransportTypeData&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;font color="#000000"&gt;Find emtpy password tag in this section that will look like:&lt;/font&gt; &lt;/p&gt;
&lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;
&lt;p&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size="2"&gt;&lt;font style="BACKGROUND-COLOR: #ffffff" color="#808000"&gt;&amp;amp;lt;&lt;/font&gt;&lt;font color="#000000"&gt;Password vt="1"/&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&lt;/font&gt;&lt;/font&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;font color="#000000"&gt;Change it to enclose you password value and vt attribute value to "8":&lt;/font&gt;&lt;/p&gt;
&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;&amp;amp;lt;&lt;font face="Courier New"&gt;&lt;font color="#000000" size="2"&gt;Password vt="8"&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;amp;gt;&lt;font color="#000000"&gt;MyPassword&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;/&lt;font color="#000000"&gt;Password&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;/font&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;font color="#000000"&gt;Save and use this binding for an automated deployment script.&lt;/font&gt;&lt;/p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=134354"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=134354" 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/paulp/aggbug/134354.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Paul Petrov</dc:creator>
            <guid>http://geekswithblogs.net/paulp/archive/2009/08/27/134354.aspx</guid>
            <pubDate>Thu, 27 Aug 2009 19:31:44 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/paulp/comments/134354.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/paulp/archive/2009/08/27/134354.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/paulp/comments/commentRss/134354.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/paulp/services/trackbacks/134354.aspx</trackback:ping>
        </item>
        <item>
            <title>Default Database Instance in WCF Adapter URI</title>
            <link>http://geekswithblogs.net/paulp/archive/2009/07/02/133222.aspx</link>
            <description>&lt;p&gt;Recently during migration BizTalk project from SQL to WCF adapter had some rather confusing moment. After deploying to test environment WCF ports started generate errors like this: &lt;/p&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;span lang="EN"&gt;&lt;strong&gt;&lt;span lang="EN"&gt;Failed to open Microsoft.ServiceModel.Channels.Common.Channels.AdapterRequestChannel, &lt;/span&gt;Faulted Microsoft.ServiceModel.Channels.Common.Channels.AdapterRequestChannel, &lt;font size="1"&gt;&lt;span lang="EN"&gt;&lt;font size="1"&gt;&lt;span lang="EN"&gt;Faulted System.ServiceModel.Channels.ServiceChannel, &lt;font size="1"&gt;&lt;span lang="EN"&gt;Failed to open System.ServiceModel.Channels.ServiceChannel&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/span&gt; &lt;/font&gt;&lt;/p&gt;
&lt;p&gt; &lt;font size="2"&gt;After few frustrating troubleshooting sessions it was found that adapter binding was missing identifier for the default database instance. Here's what we had:&lt;/font&gt;&lt;/p&gt;
&lt;table cellspacing="1" cellpadding="1" width="500" summary="" border="1"&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/td&gt;
            &lt;td&gt;&lt;strong&gt;Development&lt;/strong&gt;&lt;/td&gt;
            &lt;td&gt;&lt;strong&gt;Test&lt;/strong&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;strong&gt;SQL port URI&lt;/strong&gt;&lt;/td&gt;
            &lt;td&gt;&lt;strong&gt;SQL&lt;font face="Arial"&gt;://DevServer\DevInstance\Database&lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;
            &lt;td&gt;&lt;strong&gt;SQL&lt;font face="Arial"&gt;://TestServer/Database&lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;strong&gt;WCF port URI&lt;/strong&gt;&lt;/td&gt;
            &lt;td&gt;&lt;font face="Arial"&gt;&lt;strong&gt;mssql://TestServer/DevInstance/Database&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;
            &lt;td&gt;&lt;font face="Arial"&gt;&lt;strong&gt;mssql://TestServer/Database&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Both adapters worked in development, but in test WCF did not. What was missing is "//" between server and database part of the URI. This is not required for SQL adapter configuration but apparently is critical for the WCF adapter. So the correct URI should have been: mssql://TestServer//Database. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=133222"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=133222" 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/paulp/aggbug/133222.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Paul Petrov</dc:creator>
            <guid>http://geekswithblogs.net/paulp/archive/2009/07/02/133222.aspx</guid>
            <pubDate>Thu, 02 Jul 2009 16:14:39 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/paulp/comments/133222.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/paulp/archive/2009/07/02/133222.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/paulp/comments/commentRss/133222.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/paulp/services/trackbacks/133222.aspx</trackback:ping>
        </item>
        <item>
            <title>Microsoft ESB Guidance installation</title>
            <link>http://geekswithblogs.net/paulp/archive/2009/02/20/129572.aspx</link>
            <description>&lt;p&gt;&lt;span style="FONT-SIZE: 7.5pt; FONT-FAMILY: Arial"&gt;&lt;font face="Verdana" size="2"&gt;I just installed Microsoft Enterprise Service Bus Guidance framework (November 2007 version for BizTalk 2006 R2). Although lengthy installation process is well documented in the accompanying help file I ran into multiple issues and it took a couple of days to sort everything out. I'd like to mention here major problems/solutions in case somebody decides to go through the same. First, if you install on other than default location (C:/%PROGRAM_FILES% and C:/Projects) make sure to update all scripts and command files as well as bindings. Second, I had issue with UDDI service configuration. It wouldn't install until I enabled NTLM authentication for IIS. It is done by executing IIS utility script per &lt;/font&gt;&lt;a href="http://support.microsoft.com/kb/215383"&gt;&lt;font face="Verdana" size="2"&gt;this MS article&lt;/font&gt;&lt;/a&gt;&lt;font face="Verdana"&gt;&lt;font size="2"&gt;. But this command worked only when I dropped quotes around Negotiate,NTLM contrary to MS KB article. Also, make sure the default web site ID is "1". Some of my computers had it set to different numbers so I had to change command line appropriately.  In the end command that worked looks like this: &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;&lt;font size="2"&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 7.5pt; FONT-FAMILY: Arial"&gt;cscript adsutil.vbs get w3svc/&amp;lt;Default Web Site ID&amp;gt;/root/NTAuthenticationProviders Negotiate,NTLM&lt;/span&gt;&lt;/strong&gt;&lt;span style="FONT-SIZE: 7.5pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 7.5pt; FONT-FAMILY: Arial"&gt;&lt;font face="Verdana"&gt;&lt;font size="2"&gt;Another problem is that assemblies in MSI packages are signed with different key comparing to source projects. So even if you install all ESB components from source you will run into this issue because some of the projects  reference assemblies from packaged installation. Solution is to go through all project references, remove them and add new to ones generated from source code. The same applies to sample applications. Don't install them from MSI if you chose source code based ESB installation. Open project, update references, rebuild and deploy.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=129572"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=129572" 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/paulp/aggbug/129572.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Paul Petrov</dc:creator>
            <guid>http://geekswithblogs.net/paulp/archive/2009/02/20/129572.aspx</guid>
            <pubDate>Sat, 21 Feb 2009 00:58:50 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/paulp/comments/129572.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/paulp/archive/2009/02/20/129572.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/paulp/comments/commentRss/129572.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/paulp/services/trackbacks/129572.aspx</trackback:ping>
        </item>
        <item>
            <title>SSO Configuration Tool Updated</title>
            <link>http://geekswithblogs.net/paulp/archive/2008/12/05/127595.aspx</link>
            <description>&lt;p&gt;Uploaded new version of &lt;a href="http://geekswithblogs.net/paulp/archive/2008/05/16/122205.aspx"&gt;SSO Config Tool&lt;/a&gt; including fix for the browsing SSO Config Store application and some usability/UI improvements. &lt;a href="http://www.box.net/shared/dk0u4kynm3"&gt;Download source code&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=127595"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=127595" 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/paulp/aggbug/127595.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Paul Petrov</dc:creator>
            <guid>http://geekswithblogs.net/paulp/archive/2008/12/05/127595.aspx</guid>
            <pubDate>Fri, 05 Dec 2008 06:21:18 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/paulp/comments/127595.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/paulp/archive/2008/12/05/127595.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/paulp/comments/commentRss/127595.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/paulp/services/trackbacks/127595.aspx</trackback:ping>
        </item>
        <item>
            <title>Handling SOAP Exceptions in BizTalk Orchestrations with WCF Send Adapter</title>
            <link>http://geekswithblogs.net/paulp/archive/2008/06/23/123096.aspx</link>
            <description>&lt;font size="2"&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;Below is an idea how to improve SOAP exception handling in BizTalk to WCF communication. Let’s consider approach recommended in BizTalk SDK documentation (&lt;a href="http://go.microsoft.com/fwlink/?LinkId=99650"&gt;Catch Typed Fault Exception sample&lt;/a&gt;):&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;ol style="MARGIN-TOP: 0in" type="1"&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;Add custom WCF fault to the service contract and add corresponding exception handler in the BizTalk orchestration. &lt;/li&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;In BizTalk orchestration add hander that expects System.Web.Services.Protocols.SoapException to catch any general SOAP exceptions &lt;/li&gt;
&lt;/ol&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;This allows catching any custom WCF faults and handling them gracefully. It also handles general SOAP exceptions &lt;em&gt;but the downside is that SOAP exception caught will not be original SOAP fault that came over the wire from the service&lt;/em&gt;. It’s going to be secondary SOAP exception thrown by the adapter. Receive pipeline will try to match incoming message type using XPath expressions defined in the send port configuration. Since custom WCF faults are embedded as content of Detail node of the soap:Fault message there will be XPath expression like this: &lt;strong&gt;/*[local-name()='Fault']/*[local-name()='Detail']/* &lt;/strong&gt;| /*[local-name()='DivideResponse'], where the first part is matching any child of Detail element. In case if WCF service returns general SOAP fault it will put original exception in Detail element as ExceptionDetail node (QName: http://schemas.datacontract.org/2004/07/System.ServiceModel#ExceptionDetail). Since the schema for ExceptionDetail is unknown to pipeline it will throw SOAP exception with generic description and all original details will be lost. This secondary SOAP exception is the one that actually caught by our generic handler:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.25in"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.25in"&gt;&lt;span style="FONT-SIZE: 8.5pt"&gt;There was a failure executing the response(receive) pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Send Port: "WcfSendPort_Operator_WSHttpBinding_IOperation" URI: "http://localhost:8005/calculate" Reason: Finding the document specification by message type "http://schemas.datacontract.org/2004/07/System.ServiceModel#ExceptionDetail" failed. Verify the schema deployed properly.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.25in"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;One solution to this problem is to define http://schemas.datacontract.org/2004/07/System.ServiceModel#ExceptionDetail schema and include it as a fault contract for the WCF operation on the client side. That way all original SOAP fault details can be captured and propagated as ExceptionDetail fault. So that’s how I modified BizTalk orchestration in SDK sample:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;ol style="MARGIN-TOP: 0in" type="1"&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;Declared new schema ExceptionDetail. &lt;/li&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;Created new multi-part message type IOperation_Divide_SoapFault that has part of type ExceptionDetail &lt;/li&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;Added to Divide operation new GenericSoapFault fault of type IOperation_Divide_SoapFault &lt;/li&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;Added exception handler CatchSoapExceptionDetails for this new fault &lt;/li&gt;
&lt;/ol&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;Notice no changes required on the service side, all I had to do is on the client. But I did one thing in the service code to throw SOAP exception if numerator equal to 0 (just to be able to test such scenario):&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;           &lt;span style="COLOR: blue"&gt;if&lt;/span&gt; (numerator == 0)&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;                &lt;span style="COLOR: blue"&gt;throw&lt;/span&gt; &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; System.Web.Services.Protocols.&lt;span style="COLOR: #2b91af"&gt;SoapException&lt;/span&gt;(&lt;span style="COLOR: #a31515"&gt;"Test exception"&lt;/span&gt;, &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;XmlQualifiedName&lt;/span&gt;(&lt;span style="COLOR: #a31515"&gt;"A100"&lt;/span&gt;));&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;Dropping input file with 0 as numerator (DivideGenerateSOAPExceptionInput.xml) will create following message in the Fault folder:&lt;/div&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;="1.0"&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;="utf-8"&lt;/span&gt;?&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;MyOperationException&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.datacontract.org/2004/07/Service"&lt;/span&gt; &lt;span class="attr"&gt;xmlns:i&lt;/span&gt;&lt;span class="kwrd"&gt;="http://www.w3.org/2001/XMLSchema-instance"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Error&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;HelpLink i:nil="true" /&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;InnerException i:nil="true" /&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;Message&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;Test exception&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;/Message&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;StackTrace&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;   at Service.Operator.Divide(Int32 numerator, Int32 denominator) in C:\Projects\TestBed\Typed Fault Exception Handling\WcfService\Program.cs:line 37
   at SyncInvokeDivide(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&lt;span class="attr"&gt;&amp;amp;amp;&lt;/span&gt;amp; outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&lt;span class="attr"&gt;&amp;amp;amp;&lt;/span&gt;amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&lt;span class="attr"&gt;&amp;amp;amp;&lt;/span&gt;amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&lt;span class="attr"&gt;&amp;amp;amp;&lt;/span&gt;amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&lt;span class="attr"&gt;&amp;amp;amp;&lt;/span&gt;amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&lt;span class="attr"&gt;&amp;amp;amp;&lt;/span&gt;amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&lt;span class="attr"&gt;&amp;amp;amp;&lt;/span&gt;amp; rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;/StackTrace&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;Type&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;System.Web.Services.Protocols.SoapException&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;/Type&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;/ExceptionDetail&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Error&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Operation&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Divide&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Operation&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;MyOperationException&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt; Note it contains exception detail section with original "Test exception" message.&lt;/p&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;Another approach would be to use exclusively SOAP faults for all kind of custom and system faults, reducing number of exception handlers in orchestrations to one.  It can be achieved by implementing custom XML Disassembler pipeline component where incoming message would be inspected and if SOAP Fault is detected all properties can be copied to secondary SOAP fault thus preserving all original exception details.&lt;/div&gt;
&lt;p&gt;&lt;font size="2"&gt;Source code of modified SDK sample is &lt;a href="http://www.box.net/shared/rneikupwko"&gt;available here&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;
&lt;/font&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123096"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123096" 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/paulp/aggbug/123096.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Paul Petrov</dc:creator>
            <guid>http://geekswithblogs.net/paulp/archive/2008/06/23/123096.aspx</guid>
            <pubDate>Mon, 23 Jun 2008 17:29:28 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/paulp/comments/123096.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/paulp/archive/2008/06/23/123096.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/paulp/comments/commentRss/123096.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/paulp/services/trackbacks/123096.aspx</trackback:ping>
        </item>
        <item>
            <title>Storing BizTalk settings in custom configuration file using Enterprise Library</title>
            <link>http://geekswithblogs.net/paulp/archive/2008/06/11/122803.aspx</link>
            <description>&lt;p&gt;Choice of configuration settings storage is an important topic when it comes to enterprise BizTalk application planning. One of the &lt;a href="http://geekswithblogs.net/michaelstephenson/archive/2008/05/25/122381.aspx"&gt;many options&lt;/a&gt; is to use regular .Net configuration files. Some prefer this way over the Enterprise SSO database option for reasons of simplicity and familiarity. I wanted to show how it can be done with Microsoft Enterprise Library configuration application block.&lt;/p&gt;
&lt;p&gt;In this case Enterprise Library configuration section is placed in the BTNTSvc.exe.config file while application settings are stored in a separate configuration file. The problem here is how do we make EntLib to load required settings file at runtime.  Its done by simple helper class CustomSettings that looks up registry entry for the location and name of the application configuration file and creates FileConfigurationSource with it. The registry entry can be created  by MSI installation package.&lt;/p&gt;
&lt;p&gt;The initialization method of this static helper class looks like this (thread synchronization code omited for brevity):&lt;/p&gt;
&lt;pre class="csharpcode"&gt;          RegistryKey regKey = &lt;span class="kwrd"&gt;null&lt;/span&gt;;

          &lt;span class="kwrd"&gt;try&lt;/span&gt;
          {
             regKey = Registry.LocalMachine.OpenSubKey(&lt;span class="str"&gt;@"Software\MyCompany\MyApplication"&lt;/span&gt;);
             configurationFile = Path.Combine(
             (&lt;span class="kwrd"&gt;string&lt;/span&gt;)regKey.GetValue(&lt;span class="str"&gt;"ConfigDir"&lt;/span&gt;),
             (&lt;span class="kwrd"&gt;string&lt;/span&gt;)regKey.GetValue(&lt;span class="str"&gt;"ConfigFile"&lt;/span&gt;));

              ExeConfigurationFileMap fileMap = &lt;span class="kwrd"&gt;new&lt;/span&gt; ExeConfigurationFileMap();
              fileMap.ExeConfigFilename = configurationFile;
              configuration = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None);
              configurationSource = &lt;span class="kwrd"&gt;new&lt;/span&gt; FileConfigurationSource(configurationFile);

              &lt;span class="rem"&gt;//- store configPath in the settings&lt;/span&gt;
              configuration.AppSettings.Settings.Add(
              &lt;span class="kwrd"&gt;new&lt;/span&gt; KeyValueConfigurationElement(&lt;span class="str"&gt;"configDir"&lt;/span&gt;, (&lt;span class="kwrd"&gt;string&lt;/span&gt;)regKey.GetValue(&lt;span class="str"&gt;"ConfigDir"&lt;/span&gt;)));
           }
           &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception ex)
           {
              Debug.WriteLine(&lt;span class="str"&gt;"Exception while initializing Settings:"&lt;/span&gt; + ex.ToString());
              &lt;span class="kwrd"&gt;throw&lt;/span&gt; ex;
           }
           &lt;span class="kwrd"&gt;finally&lt;/span&gt;
           {
              &lt;span class="kwrd"&gt;if&lt;/span&gt; (regKey != &lt;span class="kwrd"&gt;null&lt;/span&gt;) regKey.Close();
           }&lt;/pre&gt;
&lt;p&gt; Then it has method to access properties by name:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; GetValue(&lt;span class="kwrd"&gt;string&lt;/span&gt; name)
        {
            KeyValueConfigurationElement entry = Configuration.AppSettings.Settings[name];

            &lt;span class="kwrd"&gt;if&lt;/span&gt; (entry == &lt;span class="kwrd"&gt;null&lt;/span&gt;)
                &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ConfigurationErrorsException(&lt;span class="str"&gt;"Key '"&lt;/span&gt; + name + &lt;span class="str"&gt;"' is not found in the configuration file."&lt;/span&gt;);

            &lt;span class="kwrd"&gt;return&lt;/span&gt; Configuration.AppSettings.Settings[name].Value;
        }&lt;/pre&gt;
&lt;p&gt; Which is used as in:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;string&lt;/span&gt; propertyValue = CustomSettings.GetValue(&lt;span class="str"&gt;"propertyName"&lt;/span&gt;);&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122803"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122803" 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/paulp/aggbug/122803.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Paul Petrov</dc:creator>
            <guid>http://geekswithblogs.net/paulp/archive/2008/06/11/122803.aspx</guid>
            <pubDate>Wed, 11 Jun 2008 20:12:37 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/paulp/comments/122803.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/paulp/archive/2008/06/11/122803.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/paulp/comments/commentRss/122803.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/paulp/services/trackbacks/122803.aspx</trackback:ping>
        </item>
        <item>
            <title>MSBuild Tasks for BizTalk Continuous Integration</title>
            <link>http://geekswithblogs.net/paulp/archive/2008/06/09/122746.aspx</link>
            <description>&lt;p&gt;If you store BizTalk application settings in Enterprise SSO database and adapt continuous integration you'll find this MS Build task useful. DeploySSOConfigStore task reads settings from XML configuration file and saves them to the SSO database. The XML can be created (exported) using &lt;a href="http://seroter.wordpress.com/"&gt;Richard Seroter's&lt;/a&gt; SSO tool which I &lt;a href="http://geekswithblogs.net/paulp/archive/2008/05/16/122205.aspx"&gt;modified to support this operation&lt;/a&gt;. So, if you change your configuration settings, just update XML file in the source control and build process will pick it up and propagate changes to your target environment. Using this task is very simple, it accepts just one parameter - location of the XML settings file:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UsingTask&lt;/span&gt; &lt;span class="attr"&gt;AssemblyFile&lt;/span&gt;&lt;span class="kwrd"&gt;="CustomMSBuildTasks.BizTalk.dll"&lt;/span&gt; &lt;span class="attr"&gt;TaskName&lt;/span&gt;&lt;span class="kwrd"&gt;="CustomMSBuildTasks.BizTalk.DeploySSOConfigStore"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Target&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;="DeploySSOConfigStore"&lt;/span&gt; &lt;span class="attr"&gt;DependsOnTargets&lt;/span&gt;&lt;span class="kwrd"&gt;="BizTalkDeploy"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;CustomMSBuildTasks.BizTalk.DeploySSOConfigStore&lt;/span&gt; XmlConfigurationUrl="$(SolutionRoot)\$(BuildBranch)\Source\BizTalkSettings\BizTalk.Configuration.xml"&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Target&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;I also added another useful task for publishing WCF services: PublishBizTalkWcfServices. It's very simple but does all that stuff: setting up virtual directories (if needed), publishing contracts, creating receive locations. It has comprehensive logging that helps tracking down deployment issues quickly.&lt;/p&gt;
&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; PublishBizTalkWcfServices : Task
    {
        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; serviceDescriptionUrl;

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// The URL to the description file.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        [Required]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; ServiceDescriptionUrl
        {
            get { &lt;span class="kwrd"&gt;return&lt;/span&gt; serviceDescriptionUrl; }
            set { serviceDescriptionUrl = &lt;span class="kwrd"&gt;value&lt;/span&gt;; }
        }

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Publishes BizTalk schemas as WCF services.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; Execute()
        {
            WcfServiceDescription description = WcfServiceDescription.LoadXml(ServiceDescriptionUrl);

            Publisher publisher = &lt;span class="kwrd"&gt;new&lt;/span&gt; Publisher();
            publisher.BackgroundWorker = &lt;span class="kwrd"&gt;new&lt;/span&gt; System.ComponentModel.BackgroundWorker();
            publisher.BackgroundWorker.WorkerReportsProgress = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
            publisher.BackgroundWorker.ProgressChanged += &lt;span class="kwrd"&gt;new&lt;/span&gt; System.ComponentModel.ProgressChangedEventHandler(BackgroundWorker_ProgressChanged);

            &lt;span class="kwrd"&gt;try&lt;/span&gt;
            {
                PublishingResults results = publisher.Publish(description);

                Log.LogMessage(results.Message);
            }
            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception ex)
            {
                Log.LogError(ex.ToString(), &lt;span class="kwrd"&gt;null&lt;/span&gt;);
                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;
            }
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;true&lt;/span&gt;;
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; BackgroundWorker_ProgressChanged(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, System.ComponentModel.ProgressChangedEventArgs e)
        {
            Log.LogMessage(e.UserState.ToString(), &lt;span class="kwrd"&gt;null&lt;/span&gt;);
        }
    }&lt;/pre&gt;
&lt;p&gt;Complete Visual Studio project is &lt;a href="http://www.box.net/shared/b7ry6iuw4o"&gt;available here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122746"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122746" 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/paulp/aggbug/122746.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Paul Petrov</dc:creator>
            <guid>http://geekswithblogs.net/paulp/archive/2008/06/09/122746.aspx</guid>
            <pubDate>Tue, 10 Jun 2008 01:04:19 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/paulp/comments/122746.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/paulp/archive/2008/06/09/122746.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/paulp/comments/commentRss/122746.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/paulp/services/trackbacks/122746.aspx</trackback:ping>
        </item>
        <item>
            <title>Improved SSO Configuration Data Store Tool</title>
            <link>http://geekswithblogs.net/paulp/archive/2008/05/16/122205.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://seroter.wordpress.com/"&gt;Richard Seroter&lt;/a&gt; published &lt;a href="http://seroter.wordpress.com/2007/09/21/biztalk-sso-configuration-data-storage-tool/"&gt;useful utility&lt;/a&gt; to store/retrieve BizTalk configuration settings in Enterprise SSO database. I added some more functionality to it.&lt;/p&gt;
&lt;p&gt;First, I added Export/Import functions allowing to actually save values in the external XML file (Richard's implementation allowed storing only field names, calling for extra work should you delete and restore SSO aplication). I kept file format the same but added values stored as text nodes:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;sso&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;application&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="eCommerce.BizTalk.Configuration"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;description&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Configuration storage for eCommerce BizTalk applications&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;description&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;appUserAccount&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;BizTalk Application Users&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;appUserAccount&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;appAdminAccount&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;BizTalk Server Administrators&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;appAdminAccount&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;contactInfo&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;http://geekswithblogs.net/paulp&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;contactInfo&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;field&lt;/span&gt; &lt;span class="attr"&gt;ordinal&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt; &lt;span class="attr"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;="App1.SiteId"&lt;/span&gt; &lt;span class="attr"&gt;masked&lt;/span&gt;&lt;span class="kwrd"&gt;="no"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;2&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;field&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;field&lt;/span&gt; &lt;span class="attr"&gt;ordinal&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="attr"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;="App1.UserId"&lt;/span&gt; &lt;span class="attr"&gt;masked&lt;/span&gt;&lt;span class="kwrd"&gt;="no"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;8&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;field&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;field&lt;/span&gt; &lt;span class="attr"&gt;ordinal&lt;/span&gt;&lt;span class="kwrd"&gt;="2"&lt;/span&gt; &lt;span class="attr"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;="App2.Timeout"&lt;/span&gt; &lt;span class="attr"&gt;masked&lt;/span&gt;&lt;span class="kwrd"&gt;="no"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;5000&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;field&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;flags&lt;/span&gt; &lt;span class="attr"&gt;configStoreApp&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt; &lt;span class="attr"&gt;allowLocalAccounts&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt; &lt;span class="attr"&gt;enableApp&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;application&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;sso&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;New usage scenarios: &lt;/p&gt;
&lt;p&gt;1. Saving configuration: &lt;/p&gt;
&lt;p&gt;1.1 Create application; &lt;br /&gt;
1.2 Save to XML; &lt;br /&gt;
1.3 Manage application - Retrieve settings; &lt;br /&gt;
1.4 Export to XML file created in (1.2).&lt;/p&gt;
&lt;p&gt;2. Restoring previously saved configuration: &lt;/p&gt;
&lt;p&gt;2.1 Create application; &lt;br /&gt;
2.2 Manage application - Import configuration from file created in (1.4) ; &lt;br /&gt;
2.3 Save Changes.&lt;/p&gt;
&lt;p&gt;Accordingly, menu items Import/Export available when the Manage Application tab is selected only.&lt;/p&gt;
&lt;p&gt;The code can be &lt;a href="http://www.box.net/shared/dk0u4kynm3"&gt;downloaded here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122205"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122205" 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/paulp/aggbug/122205.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Paul Petrov</dc:creator>
            <guid>http://geekswithblogs.net/paulp/archive/2008/05/16/122205.aspx</guid>
            <pubDate>Fri, 16 May 2008 20:54:34 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/paulp/comments/122205.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/paulp/archive/2008/05/16/122205.aspx#feedback</comments>
            <slash:comments>9</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/paulp/comments/commentRss/122205.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/paulp/services/trackbacks/122205.aspx</trackback:ping>
        </item>
        <item>
            <title>Generic BizTalk message broker source code</title>
            <link>http://geekswithblogs.net/paulp/archive/2008/02/04/119274.aspx</link>
            <description>I uploaded source code for the generic BizTalk message broker described in &lt;a href="http://geekswithblogs.net/paulp/archive/2008/01/24/118874.aspx"&gt;this post&lt;/a&gt;.&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=119274"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=119274" 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/paulp/aggbug/119274.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Paul Petrov</dc:creator>
            <guid>http://geekswithblogs.net/paulp/archive/2008/02/04/119274.aspx</guid>
            <pubDate>Mon, 04 Feb 2008 18:18:30 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/paulp/comments/119274.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/paulp/archive/2008/02/04/119274.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/paulp/comments/commentRss/119274.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/paulp/services/trackbacks/119274.aspx</trackback:ping>
        </item>
    </channel>
</rss>