<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Connected Thoughts - Thiago Almeida</title>
	<atom:link href="http://connectedthoughts.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://connectedthoughts.wordpress.com</link>
	<description>Connected systems and the occasional picture</description>
	<lastBuildDate>Sun, 01 Nov 2009 19:21:35 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='connectedthoughts.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/74e9e1611c30e711a2f764f63e725276?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Connected Thoughts - Thiago Almeida</title>
		<link>http://connectedthoughts.wordpress.com</link>
	</image>
			<item>
		<title>ACSUG Meeting Thursday November 19 &#8211; A Practical exploration of the Business Rules Engine in BizTalk Server with Jeffrey Chilberto</title>
		<link>http://connectedthoughts.wordpress.com/2009/11/02/acsug-meeting-thursday-november-19-a-practical-exploration-of-the-business-rules-engine-in-biztalk-server-with-jeffrey-chilberto/</link>
		<comments>http://connectedthoughts.wordpress.com/2009/11/02/acsug-meeting-thursday-november-19-a-practical-exploration-of-the-business-rules-engine-in-biztalk-server-with-jeffrey-chilberto/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 19:21:35 +0000</pubDate>
		<dc:creator>Thiago Almeida</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://connectedthoughts.wordpress.com/2009/11/02/acsug-meeting-thursday-november-19-a-practical-exploration-of-the-business-rules-engine-in-biztalk-server-with-jeffrey-chilberto/</guid>
		<description><![CDATA[
I’m happy to announce that the next Auckland Connected Systems User Group meeting is set for the 19th of November 6:00pm at Datacom, 210 Federal Street downtown Auckland, New Zealand . Free entry, pizza and drinks provided as usual. Register here.
Jeff will take us through a practical exploration of the powerful Business Rules Engine in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=371&subd=connectedthoughts&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://connectedthoughts.files.wordpress.com/2009/05/acsuglogotitle.gif"><img style="display:inline;border-width:0;" title="ACSUGLogoTitle" border="0" alt="ACSUGLogoTitle" src="http://connectedthoughts.files.wordpress.com/2009/05/acsuglogotitle_thumb.gif?w=244&amp;h=54&#038;h=54" width="244" height="54" /></a>
<p>I’m happy to announce that the next Auckland Connected Systems User Group meeting is set for the <b>19<sup>th</sup> of November 6:00pm</b> at<b> Datacom</b>,<b> 210 Federal Street</b> downtown Auckland, New Zealand . Free entry, pizza and drinks provided as usual. <a href="http://www.acsug.co.nz/Meetings/Practical-exploration-of-the-Business-Rules-Engine.aspx">Register here</a>.</p>
<p>Jeff will take us through a practical exploration of the powerful<strong> Business Rules Engine</strong> in BizTalk Server, including guidance on creating vocabulary and policies, versioning pitfalls, and exposing the BRE as a WCF service. </p>
<p><a href="http://bloggingabout.net/blogs/chilberto">Jeffrey Chilberto</a> is a Software Consultant specialising in designing and developing business solutions using the Microsoft technology stack.&#160; His focus is integration solutions using BizTalk, WCF and SQL Server technologies.</p>
<p><a href="http://www.acsug.co.nz/Meetings/Practical-exploration-of-the-Business-Rules-Engine.aspx">More information and </a><a href="http://www.acsug.co.nz/Meetings/Practical-exploration-of-the-Business-Rules-Engine.aspx">registration form</a>. </p>
<p>See you there!</p>
<p>Thiago Almeida</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedthoughts.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedthoughts.wordpress.com/371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedthoughts.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedthoughts.wordpress.com/371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedthoughts.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedthoughts.wordpress.com/371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedthoughts.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedthoughts.wordpress.com/371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedthoughts.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedthoughts.wordpress.com/371/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=371&subd=connectedthoughts&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedthoughts.wordpress.com/2009/11/02/acsug-meeting-thursday-november-19-a-practical-exploration-of-the-business-rules-engine-in-biztalk-server-with-jeffrey-chilberto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8f5dbd52b07e1626609604032d7934f9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Thiago</media:title>
		</media:content>

		<media:content url="http://connectedthoughts.files.wordpress.com/2009/05/acsuglogotitle_thumb.gif?w=244&#38;h=54&#38;h=54" medium="image">
			<media:title type="html">ACSUGLogoTitle</media:title>
		</media:content>
	</item>
		<item>
		<title>BizTalk Server 2009 and Dublin podcast with Emil Velinov and Darryl Burling</title>
		<link>http://connectedthoughts.wordpress.com/2009/10/12/biztalk-server-2009-and-dublin-podcast-with-emil-velinov-and-darryl-burling/</link>
		<comments>http://connectedthoughts.wordpress.com/2009/10/12/biztalk-server-2009-and-dublin-podcast-with-emil-velinov-and-darryl-burling/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 00:27:12 +0000</pubDate>
		<dc:creator>Thiago Almeida</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://connectedthoughts.wordpress.com/2009/10/12/biztalk-server-2009-and-dublin-podcast-with-emil-velinov-and-darryl-burling/</guid>
		<description><![CDATA[Emil Velinov from the Customer Experience Team in the Business Process Division (CSD + SQL) came to the New Zealand Tech Ed in September to present on BizTalk Server 2009 and Dublin. 
During the visit the manager for BizTalk Server in New Zealand, Darryl Burling, spent some time with Emil to discuss BizTalk and Dublin [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=369&subd=connectedthoughts&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Emil Velinov from the Customer Experience Team in the Business Process Division (CSD + SQL) came to the New Zealand Tech Ed in September to present on BizTalk Server 2009 and Dublin. </p>
<p>During the visit the manager for BizTalk Server in New Zealand, <a href="http://www.burling.co.nz">Darryl Burling</a>, spent some time with Emil to discuss BizTalk and Dublin as part of an awesome podcast series that Darryl is running. I highly recommend following the <a href="http://feeds.feedburner.com/MSNZPodcast">podcast</a>, and this entry in particular for anyone interested in BizTalk and/or Dublin:</p>
<p><a href="http://www.burling.co.nz/post/MSNZ-Podcast-5-e28093-BizTalk-Server-2009-and-Dublin.aspx">http://www.burling.co.nz/post/MSNZ-Podcast-5-e28093-BizTalk-Server-2009-and-Dublin.aspx</a></p>
<p>Regards,</p>
<p>Thiago Almeida</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedthoughts.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedthoughts.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedthoughts.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedthoughts.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedthoughts.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedthoughts.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedthoughts.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedthoughts.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedthoughts.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedthoughts.wordpress.com/369/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=369&subd=connectedthoughts&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedthoughts.wordpress.com/2009/10/12/biztalk-server-2009-and-dublin-podcast-with-emil-velinov-and-darryl-burling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8f5dbd52b07e1626609604032d7934f9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Thiago</media:title>
		</media:content>
	</item>
		<item>
		<title>Visio icons for BizTalk Server</title>
		<link>http://connectedthoughts.wordpress.com/2009/10/02/visio-icons-for-biztalk-server/</link>
		<comments>http://connectedthoughts.wordpress.com/2009/10/02/visio-icons-for-biztalk-server/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 21:18:19 +0000</pubDate>
		<dc:creator>Thiago Almeida</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://connectedthoughts.wordpress.com/2009/10/02/visio-icons-for-biztalk-server/</guid>
		<description><![CDATA[Every time when creating a Visio diagram for a solution architecture involving BizTalk I can’t really find a good server icon for BizTalk Server. Then I twittered my frustration. 
What ensued is one of the best things about Twitter in my opinion.&#160; Two twitter messages away I got the icons! Thanks to Todd Sussman and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=366&subd=connectedthoughts&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Every time when creating a Visio diagram for a solution architecture involving BizTalk I can’t really find a good server icon for BizTalk Server. Then I <a href="http://twitter.com/thiago_bagua/status/4507830352">twittered my frustration</a>. </p>
<p>What ensued is one of the best things about Twitter in my opinion.&#160; Two <a href="http://twitter.com/BizTodd/status/4518318725">twitter</a> <a href="http://twitter.com/rickggaribay/status/4518999940">messages</a> away I got the icons! Thanks to <a href="http://geekswithblogs.net/BizTodd">Todd Sussman</a> and <a href="http://rickgaribay.net/">Rick Garibay</a> for hooking me up. If I had looked around I would have found <a href="http://hhoffman50.wordpress.com/2009/02/19/visio-shapes-for-biztalk-server/">two of them</a>, but this has a few extra stencils in the file.</p>
<p>Get them while they’re hot:</p>
<p><a title="http://cid-df930ee6f91132fd.skydrive.live.com/self.aspx/Public/Share/BiztalkServer2006.vss" href="http://cid-df930ee6f91132fd.skydrive.live.com/self.aspx/Public/Share/BiztalkServer2006.vss">http://cid-df930ee6f91132fd.skydrive.live.com/self.aspx/Public/Share/BiztalkServer2006.vss</a></p>
<p><a href="http://cid-df930ee6f91132fd.skydrive.live.com/self.aspx/Public/Share/BiztalkServer2006.vss"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://connectedthoughts.files.wordpress.com/2009/10/image1.png?w=607&#038;h=97" width="607" height="97" /></a> </p>
</p>
<p>&#160;</p>
<p>Other useful stencils for BizTalk are:</p>
<p>The icons from Enterprise Integration Patterns available here: <a title="http://enterpriseintegrationpatterns.com/downloads.html" href="http://enterpriseintegrationpatterns.com/downloads.html">http://enterpriseintegrationpatterns.com/downloads.html</a></p>
<p>Some stencils by <a href="http://www.andre-dammeyer.de/">André Dammeyer</a>: <a href="http://www.acsug.co.nz/files/Downloads/BizTalk-2006-Messaging-Shapes.aspx">http://www.acsug.co.nz/files/Downloads/BizTalk-2006-Messaging-Shapes.aspx</a></p>
<p>Do you have any others?</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedthoughts.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedthoughts.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedthoughts.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedthoughts.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedthoughts.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedthoughts.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedthoughts.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedthoughts.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedthoughts.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedthoughts.wordpress.com/366/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=366&subd=connectedthoughts&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedthoughts.wordpress.com/2009/10/02/visio-icons-for-biztalk-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8f5dbd52b07e1626609604032d7934f9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Thiago</media:title>
		</media:content>

		<media:content url="http://connectedthoughts.files.wordpress.com/2009/10/image1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Set your BizTalk Server 2009 and 2006 R2 services start up type to Automatic (Delayed Start)</title>
		<link>http://connectedthoughts.wordpress.com/2009/09/22/set-your-biztalk-server-2009-and-2006-r2-services-start-up-type-to-automatic-delayed-start/</link>
		<comments>http://connectedthoughts.wordpress.com/2009/09/22/set-your-biztalk-server-2009-and-2006-r2-services-start-up-type-to-automatic-delayed-start/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 02:26:47 +0000</pubDate>
		<dc:creator>Thiago Almeida</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://connectedthoughts.wordpress.com/2009/09/22/set-your-biztalk-server-2009-and-2006-r2-services-start-up-type-to-automatic-delayed-start/</guid>
		<description><![CDATA[We’ve recently had some development and test BizTalk environments move data centres, and after the BizTalk Server machines were restarted the BizTalk host instance services stayed disabled. 
By default the BizTalk host instance service (the windows services named ‘BizTalk Service BizTalk Group: &#60;host name&#62;’) have a start up type of Automatic. There is a known [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=363&subd=connectedthoughts&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We’ve recently had some development and test BizTalk environments move data centres, and after the BizTalk Server machines were restarted the BizTalk host instance services stayed disabled. </p>
<p>By default the BizTalk host instance service (the windows services named ‘BizTalk Service BizTalk Group: &lt;host name&gt;’) have a start up type of <em>Automatic</em>. There is a known issue with Windows Server 2008 and Windows Vista where the Enterprise Single Sign-On service doesn’t start quickly enough and the BizTalk host services end up failing to start.</p>
<p>The resolution is simple: change the start up types for the BizTalk services on all the BizTalk machines in the group to <em>Automatic (Delayed Start)</em>. This gives the Enterprise Single Sign-On enough time to start before the BizTalk services try starting.</p>
<p><a href="http://connectedthoughts.files.wordpress.com/2009/09/image.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://connectedthoughts.files.wordpress.com/2009/09/image_thumb.png?w=644&#038;h=169" width="644" height="169" /></a> </p>
<p>This behaviour has been acknowledged by Microsoft in the support article <a href="http://support.microsoft.com/kb/942284">942284</a> and in the <a href="http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/8a98211b-a158-40a9-b71d-31b327dbd1c4">BizTalk forums</a>.</p>
<p>So if your company are running BizTalk 2009 on Windows Server 2008, or BizTalk 2009/2006R2 on Windows Vista you should update your installation, release, or deployment notes to include updating the services start up type.</p>
<p>&#160;</p>
<p>Regards,</p>
<p>Thiago</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedthoughts.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedthoughts.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedthoughts.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedthoughts.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedthoughts.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedthoughts.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedthoughts.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedthoughts.wordpress.com/363/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedthoughts.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedthoughts.wordpress.com/363/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=363&subd=connectedthoughts&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedthoughts.wordpress.com/2009/09/22/set-your-biztalk-server-2009-and-2006-r2-services-start-up-type-to-automatic-delayed-start/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8f5dbd52b07e1626609604032d7934f9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Thiago</media:title>
		</media:content>

		<media:content url="http://connectedthoughts.files.wordpress.com/2009/09/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>TechNet Webcast on BizTalk Server 2009 Performance</title>
		<link>http://connectedthoughts.wordpress.com/2009/08/31/technet-webcast-on-biztalk-server-2009-performance/</link>
		<comments>http://connectedthoughts.wordpress.com/2009/08/31/technet-webcast-on-biztalk-server-2009-performance/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 01:25:41 +0000</pubDate>
		<dc:creator>Thiago Almeida</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://connectedthoughts.wordpress.com/2009/08/31/technet-webcast-on-biztalk-server-2009-performance/</guid>
		<description><![CDATA[
Just got a note from Ewan Fairweather from the BizTalk Customer Advisory Team. He is presenting a TechNet webcast on the BizTalk performance tests him and his team have performed this year and their results. 
The webcast is happening in a couple of days (Tuesday, September 01, 2009 1:00 PM Pacific Time). For those in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=360&subd=connectedthoughts&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://connectedthoughts.files.wordpress.com/2009/08/image6.png"><img style="border-bottom:0;border-left:0;display:inline;margin-left:0;border-top:0;margin-right:0;border-right:0;" title="image" border="0" alt="image" align="right" src="http://connectedthoughts.files.wordpress.com/2009/08/image_thumb6.png?w=240&#038;h=122" width="240" height="122" /></a></p>
<p>Just got a note from <a href="http://blogs.msdn.com/ewanf/">Ewan Fairweather</a> from the BizTalk Customer Advisory Team. He is presenting <a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032416252&amp;EventCategory=4&amp;culture=en-US&amp;CountryCode=US">a TechNet webcast</a> on the BizTalk performance tests him and his team have performed this year and their results. </p>
<p>The webcast is happening in a couple of days (Tuesday, September 01, 2009 1:00 PM Pacific Time). For those in New Zealand that is Wednesday, 2 September 2009 at 8:00:00 a.m. </p>
<p>To read more about it and register for the webcast follow this link:</p>
<p><a title="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032416252&amp;EventCategory=4&amp;culture=en-US&amp;CountryCode=US" href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032416252&amp;EventCategory=4&amp;culture=en-US&amp;CountryCode=US">http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032416252&amp;EventCategory=4&amp;culture=en-US&amp;CountryCode=US</a></p>
<p>Regards,</p>
<p>Thiago</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedthoughts.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedthoughts.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedthoughts.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedthoughts.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedthoughts.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedthoughts.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedthoughts.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedthoughts.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedthoughts.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedthoughts.wordpress.com/360/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=360&subd=connectedthoughts&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedthoughts.wordpress.com/2009/08/31/technet-webcast-on-biztalk-server-2009-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8f5dbd52b07e1626609604032d7934f9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Thiago</media:title>
		</media:content>

		<media:content url="http://connectedthoughts.files.wordpress.com/2009/08/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Register for Code Camp Auckland, 13 September 2009 &#8211; Development &#124; SQL &#124; Security</title>
		<link>http://connectedthoughts.wordpress.com/2009/08/31/register-for-code-camp-auckland-13-september-2009-development-sql-security/</link>
		<comments>http://connectedthoughts.wordpress.com/2009/08/31/register-for-code-camp-auckland-13-september-2009-development-sql-security/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 21:37:40 +0000</pubDate>
		<dc:creator>Thiago Almeida</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://connectedthoughts.wordpress.com/2009/08/31/register-for-code-camp-auckland-13-september-2009-development-sql-security/</guid>
		<description><![CDATA[Code Camp Auckland is coming fast – 13 of September 2009, the Sunday before Tech Ed. With many international and local speakers, this is the biggest Code Camp ever.
If you want to catch some free&#160; sessions on the state-of-the-art in .NET development, SQL Server and developer security&#160; then sign up for Code Camp Auckland 2009 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=357&subd=connectedthoughts&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://www.dot.net.nz/GeneralPages/CodeCampAuckland2009.aspx">Code Camp Auckland</a> is coming fast – 13 of September 2009, the Sunday before Tech Ed. With many international and local speakers, this is the biggest Code Camp ever.<a href="http://connectedthoughts.files.wordpress.com/2009/08/codecamplogolarge.png"><img style="border-bottom:0;border-left:0;display:inline;margin-left:0;border-top:0;margin-right:0;border-right:0;" title="CodeCampLogoLarge" border="0" alt="CodeCampLogoLarge" align="right" src="http://connectedthoughts.files.wordpress.com/2009/08/codecamplogolarge_thumb.png?w=240&#038;h=240" width="240" height="240" /></a></p>
<p>If you want to catch some <strong><i>free</i>&#160;</strong> sessions on the state-of-the-art in .NET development, SQL Server and developer security&#160; then sign up for <a href="http://www.dot.net.nz/GeneralPages/CodeCampAuckland2009.aspx">Code Camp Auckland 2009</a> now.</p>
<p>To cover the costs of the event, we have the help of our generous sponsors: <a href="http://www.microsoft.co.nz">Microsoft</a>, <a href="http://www.datacom.co.nz">Datacom</a>, <a href="http://www.intergen.co.nz">Intergen</a>, <a href="http://apac.ineta.org">INETA</a> and <a href="http://www.xero.com">Xero</a>.</p>
<p>So make sure you <a href="http://www.dot.net.nz/GeneralPages/CodeCampAuckland2009.aspx">visit the website</a> for more details, and <a href="http://www.codecamp.net.nz/">sign up now</a>!</p>
<p>See you there,</p>
<p>Thiago</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedthoughts.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedthoughts.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedthoughts.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedthoughts.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedthoughts.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedthoughts.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedthoughts.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedthoughts.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedthoughts.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedthoughts.wordpress.com/357/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=357&subd=connectedthoughts&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedthoughts.wordpress.com/2009/08/31/register-for-code-camp-auckland-13-september-2009-development-sql-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8f5dbd52b07e1626609604032d7934f9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Thiago</media:title>
		</media:content>

		<media:content url="http://connectedthoughts.files.wordpress.com/2009/08/codecamplogolarge_thumb.png" medium="image">
			<media:title type="html">CodeCampLogoLarge</media:title>
		</media:content>
	</item>
		<item>
		<title>Receiving MIME encoded email files and a hidden POP3 context property</title>
		<link>http://connectedthoughts.wordpress.com/2009/08/12/receiving-mime-encoded-email-files-and-a-hidden-pop3-context-property/</link>
		<comments>http://connectedthoughts.wordpress.com/2009/08/12/receiving-mime-encoded-email-files-and-a-hidden-pop3-context-property/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 11:28:33 +0000</pubDate>
		<dc:creator>Thiago Almeida</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://connectedthoughts.wordpress.com/2009/08/12/receiving-mime-encoded-email-files-and-a-hidden-pop3-context-property/</guid>
		<description><![CDATA[&#160;
Now that POP3 is not a part of Windows Server 2008 it is probably timely to post on a hidden POP3 adapter context property that you can use to decode emails picked up from the file system without actually using the POP3 adapter. I’ve been meaning to blog this for a while since I investigated [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=354&subd=connectedthoughts&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>&#160;</p>
<p>Now that POP3 is not a part of Windows Server 2008 it is probably timely to post on a hidden POP3 adapter context property that you can use to decode emails picked up from the file system without actually using the POP3 adapter. I’ve been meaning to blog this for a while since I investigated it when reviewing <a href="http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/7abf170a-3942-4918-80c8-a916da66a6cd">a question on the MSDN forums</a>. This trick is also useful for when you are using the POP3 Adapter but need to store the original email before any MIME decoding and then need to apply the decoding to it (in this case set the ‘Apply MIME decoding’ property on the POP3 adapter to false then use the method below later).</p>
<p>The POP3 adapter handles the POP3 protocol negotiation over TCP/IP to retrieve MIME encoded email messages. Once it has the email content, it puts it internally through an instance of the MIME/SMIME pipeline component (which in turn uses the COM dll BTSMIMEComps.dll) to decode it, and from there the message is given to the receive location pipeline.</p>
<p>The adapter writes (not promotes) an undocumented context property called <strong>CopyMailHeadersToContext</strong> to the message context before passing it to the MIME/SMIME pipeline component – this tells the component to add some POP3 properties to the message context as well.</p>
<p>So if you have MIME encoded emails being forwarded to BizTalk via file, FTP or otherwise (usually files with a .eml extension), you can reproduce the adapter’s behaviour by creating a very simple pipeline component to write the CopyMailHeadersToContext property with the POP3 adapter namespace and a value of 3 (don’t ask me why 3, still not sure about this value), then place it just before the MIME/SMIME pipeline component in the decode stage of a receive pipeline:</p>
<p><a href="http://connectedthoughts.files.wordpress.com/2009/08/image4.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="321" alt="image" src="http://connectedthoughts.files.wordpress.com/2009/08/image_thumb4.png?w=215&#038;h=321" width="215" border="0" /></a> </p>
<p>This is the execute method of the pipeline component, almost as simple as it gets:</p>
<pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"><span style="color:#0000ff;">public</span> IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg)
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">{
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">   <span style="color:#008000;">//By writing this to the context we tell the MIME/SMIME decoder to</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">   <span style="color:#008000;">//populate the POP3 context properties while going through the email message</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">   pInMsg.Context.Write(&quot;<span style="color:#8b0000;">CopyMailHeadersToContext</span>&quot;,
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">   &quot;<span style="color:#8b0000;">http://schemas.microsoft.com/BizTalk/2003/pop3-properties</span>&quot;, 3);
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">   <span style="color:#0000ff;">return</span> pInMsg;
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">}</pre>
</pre>
<p>Once the message goes through this pipeline you will then get some valuable properties in the context that you wouldn’t see with just the MIME/SMIME component. The properties are Date, From, Headers, Subject, and To:</p>
<p><a href="http://connectedthoughts.files.wordpress.com/2009/08/image5.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="529" alt="image" src="http://connectedthoughts.files.wordpress.com/2009/08/image_thumb5.png?w=549&#038;h=529" width="549" border="0" /></a>&#160;</p>
<p>And that’s it, pretty simple really <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p><a href="http://www.acsug.co.nz/files/Downloads/Blog-EmailMessageDecoder.aspx">Download the sample here</a> (Visual Studio 2008, BizTalk 2009)</p>
<p>Regards,</p>
<p>Thiago Almeida</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedthoughts.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedthoughts.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedthoughts.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedthoughts.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedthoughts.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedthoughts.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedthoughts.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedthoughts.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedthoughts.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedthoughts.wordpress.com/354/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=354&subd=connectedthoughts&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedthoughts.wordpress.com/2009/08/12/receiving-mime-encoded-email-files-and-a-hidden-pop3-context-property/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8f5dbd52b07e1626609604032d7934f9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Thiago</media:title>
		</media:content>

		<media:content url="http://connectedthoughts.files.wordpress.com/2009/08/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://connectedthoughts.files.wordpress.com/2009/08/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>BAM Portal is not a SharePoint website</title>
		<link>http://connectedthoughts.wordpress.com/2009/08/12/bam-portal-is-not-a-sharepoint-website/</link>
		<comments>http://connectedthoughts.wordpress.com/2009/08/12/bam-portal-is-not-a-sharepoint-website/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 20:33:49 +0000</pubDate>
		<dc:creator>Thiago Almeida</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://connectedthoughts.wordpress.com/2009/08/12/bam-portal-is-not-a-sharepoint-website/</guid>
		<description><![CDATA[A common misconception is that SharePoint is needed for the BizTalk BAM Portal.&#160; I just wanted to write this quick blog post to say that SharePoint is not needed for BAM or the BAM Portal. The BAM Portal is a normal ASP.NET website, and does not require SharePoint at all.
As a BizTalk Server 2009 prerequisite [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=347&subd=connectedthoughts&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A common misconception is that SharePoint is needed for the BizTalk BAM Portal.&#160; I just wanted to write this quick blog post to say that <strong>SharePoint is not needed for BAM or the BAM Portal</strong>. The BAM Portal is a normal ASP.NET website, and does not require SharePoint at all.</p>
<p>As a BizTalk Server 2009 prerequisite you only need SharePoint if you are using the <strong>Windows SharePoint Services Adapter</strong>.&#160; The supported versions for the adapter are WSS 2.0 with Service Pack 3 (SP3), WSS 3.0 with Service Pack 1 (SP1), and Microsoft Office SharePoint Server 2007 (MOSS).&#160; So you do no need to install WSS or MOSS if you do not plan to use this adapter (but are welcome to <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</p>
<p>In previous versions of BizTalk prior to 2009 SharePoint was also required by Business Activity Services (BAS), which has been removed and is not a part of the 2009 release.</p>
<p>Of course you can use a SharePoint webpart to present the data collected by the BAM activities and views, but it has nothing to do with the BAM Portal.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedthoughts.wordpress.com/347/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedthoughts.wordpress.com/347/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedthoughts.wordpress.com/347/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedthoughts.wordpress.com/347/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedthoughts.wordpress.com/347/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedthoughts.wordpress.com/347/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedthoughts.wordpress.com/347/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedthoughts.wordpress.com/347/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedthoughts.wordpress.com/347/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedthoughts.wordpress.com/347/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=347&subd=connectedthoughts&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedthoughts.wordpress.com/2009/08/12/bam-portal-is-not-a-sharepoint-website/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8f5dbd52b07e1626609604032d7934f9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Thiago</media:title>
		</media:content>
	</item>
		<item>
		<title>Sending XML messages to BizTalk using the WCF Channel Model</title>
		<link>http://connectedthoughts.wordpress.com/2009/08/09/sending-xml-messages-to-biztalk-using-the-wcf-channel-model/</link>
		<comments>http://connectedthoughts.wordpress.com/2009/08/09/sending-xml-messages-to-biztalk-using-the-wcf-channel-model/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 04:06:18 +0000</pubDate>
		<dc:creator>Thiago Almeida</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://connectedthoughts.wordpress.com/2009/08/09/sending-xml-messages-to-biztalk-using-the-wcf-channel-model/</guid>
		<description><![CDATA[It is quite a common requirement to have a generic receive location in BizTalk to accept any XML file. Richard Seroter has listed a few options already on how to do this. 


I looked into how BizTalk exposes its WCF receive locations and how they could be consumed by using the WCF channel model, without [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=344&subd=connectedthoughts&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p class="MsoNormal"><span>It is quite a common requirement to have a generic receive location in BizTalk to accept any XML file. Richard Seroter has listed </span><span lang="EN-US"><a href="http://seroter.wordpress.com/2009/06/16/four-ways-to-accept-any-xml-data-into-biztalk-web-services/"><span lang="EN-NZ">a few options</span></a></span><span> already on how to do this. </span></p>
</p>
</p>
<p class="MsoNormal"><span>I looked into how BizTalk exposes its WCF receive locations and how they could be consumed by using the WCF channel model, without having to use WSDLs or proxy classes.</span></p>
<p class="MsoNormal"><span></span></p>
</p>
</p>
<h2>Creating the BizTalk Receive Location</h2>
<p class="MsoNormal"><span lang="EN-US">In my scenario I created a one way BizTalk receive port, and a receive location with the WCF.NetTcp adapter and the XMLReceive pipeline (but you could choose other WCF adapters here): </span></p>
<p class="MsoNormal"><span></span><span></span></p>
</p>
</p>
<p class="MsoNormal"><a href="http://connectedthoughts.files.wordpress.com/2009/08/image.png"><img title="image" style="display:inline;border-width:0;" height="435" alt="image" src="http://connectedthoughts.files.wordpress.com/2009/08/image_thumb.png?w=543&#038;h=435" width="543" border="0" /></a></p>
<p class="MsoNormal"><span>I then configured the WCF-NetTcp adapter properties by entering a URI and changing the security mode to None (for simplicity sake): </span></p>
</p>
</p>
<p class="MsoNormal"><a href="http://connectedthoughts.files.wordpress.com/2009/08/image1.png"><img title="image" style="display:inline;border-width:0;" height="463" alt="image" src="http://connectedthoughts.files.wordpress.com/2009/08/image_thumb1.png?w=337&#038;h=463" width="337" border="0" /></a> <a href="http://connectedthoughts.files.wordpress.com/2009/08/image2.png"><img title="image" style="display:inline;border-width:0;" height="464" alt="image" src="http://connectedthoughts.files.wordpress.com/2009/08/image_thumb2.png?w=338&#038;h=464" width="338" border="0" /></a> </p>
<p class="MsoNormal">&#160;</p>
<h2>The WCF Adapter Interfaces</h2>
<p class="MsoNormal"><span>The main part of the BizTalk WCF receive locations is in <b>Microsoft.BizTalk.Adapter.Wcf.Runtime.dll </b>found on the installation folder<span>&#160; </span>of BizTalk 2006 R2 and 2009. </span></p>
</p>
</p>
<p class="MsoNormal"><span>As already </span><span lang="EN-US"><a href="http://blogs.msdn.com/paolos/archive/2009/05/22/how-to-throw-typed-fault-exceptions-from-orchestrations-published-as-wcf-services.aspx"><span lang="EN-NZ">noted by Paolo Salvatori</span></a></span><span> “the WCF Receive Adapter instantiates a singleton instance of the BizTalkServiceInstance class for each WCF Receive Location”. The BizTalkServiceInstance class declaration implements the following service contract interfaces: </span></p>
</p>
</p>
<pre style="margin-left:36pt;text-indent:-18pt;"><span style="font-size:11pt;font-family:symbol;"><span>·<span style="font:7pt &#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US"><a title="Microsoft.BizTalk.Adapter.Wcf.Runtime.ITwoWayAsync" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.BizTalk.Adapter.Wcf.Runtime:3.0.1.0:31bf3856ad364e35/Microsoft.BizTalk.Adapter.Wcf.Runtime.ITwoWayAsync"><span lang="EN-NZ" style="font-size:11pt;color:windowtext;font-family:&#39;text-decoration:none;">ITwoWayAsync</span></a></span></pre>
<pre style="margin-left:36pt;text-indent:-18pt;"><span style="font-size:11pt;font-family:symbol;"><span>·<span style="font:7pt &#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US"><a title="Microsoft.BizTalk.Adapter.Wcf.Runtime.ITwoWayAsyncVoid" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.BizTalk.Adapter.Wcf.Runtime:3.0.1.0:31bf3856ad364e35/Microsoft.BizTalk.Adapter.Wcf.Runtime.ITwoWayAsyncVoid"><span lang="EN-NZ" style="font-size:11pt;color:windowtext;font-family:&#39;text-decoration:none;">ITwoWayAsyncVoid</span></a></span></pre>
<pre style="margin-left:36pt;text-indent:-18pt;"><span style="font-size:11pt;font-family:symbol;"><span>·<span style="font:7pt &#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US"><a title="Microsoft.BizTalk.Adapter.Wcf.Runtime.IOneWayAsync" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.BizTalk.Adapter.Wcf.Runtime:3.0.1.0:31bf3856ad364e35/Microsoft.BizTalk.Adapter.Wcf.Runtime.IOneWayAsync"><span lang="EN-NZ" style="font-size:11pt;color:windowtext;font-family:&#39;text-decoration:none;">IOneWayAsync</span></a></span></pre>
<pre style="margin-left:36pt;text-indent:-18pt;"><span style="font-size:11pt;font-family:symbol;"><span>·<span style="font:7pt &#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US"><a title="Microsoft.BizTalk.Adapter.Wcf.Runtime.IOneWayAsyncTxn" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.BizTalk.Adapter.Wcf.Runtime:3.0.1.0:31bf3856ad364e35/Microsoft.BizTalk.Adapter.Wcf.Runtime.IOneWayAsyncTxn"><span lang="EN-NZ" style="font-size:11pt;color:windowtext;font-family:&#39;text-decoration:none;">IOneWayAsyncTxn</span></a></span></pre>
<pre style="margin-left:36pt;text-indent:-18pt;"><span style="font-size:11pt;font-family:symbol;"><span>·<span style="font:7pt &#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US"><a title="Microsoft.BizTalk.Adapter.Wcf.Runtime.ITwoWayAsyncVoidTxn" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.BizTalk.Adapter.Wcf.Runtime:3.0.1.0:31bf3856ad364e35/Microsoft.BizTalk.Adapter.Wcf.Runtime.ITwoWayAsyncVoidTxn"><span lang="EN-NZ" style="font-size:11pt;color:windowtext;font-family:&#39;text-decoration:none;">ITwoWayAsyncVoidTxn</span></a></span></pre>
<p class="MsoNormal"><span></span></p>
<p>&#160;</p>
</p>
<p class="MsoNormal"><span>Each of these cover the different scenarios of the WCF receive locations. They all have a <b>BizTalkSubmit</b> method, but if you inspect the BizTalkServiceInstance class’ implementation of this method (for all of the interfaces) you’ll notice that it’ll throw a </span><b><span lang="EN-US">NotSupportedException</span></b><span lang="EN-US"> exception, so you can’t use this method to submit messages to the </span><span>BizTalkServiceInstance instance</span><span lang="EN-US">. Read up <a href="http://blogs.msdn.com/paolos/archive/2009/05/22/how-to-throw-typed-fault-exceptions-from-orchestrations-published-as-wcf-services.aspx">Paolo’s post</a> for some more information. Here’s the BizTalkSubmit implementation for the ITwoWayAsynchVoid for example:</span></p>
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;"><span lang="EN-US" style="font-size:10pt;color:black;font-family:&quot;letter-spacing:-.75pt;"></span><span lang="EN" style="color:black;font-family:&quot;letter-spacing:-.75pt;"></span></p>
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;">
</p>
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;">
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;">
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;">
<pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">[OperationBehavior]
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"><span style="color:#0000ff;">void</span> ITwoWayAsyncVoid.BizTalkSubmit(Message message)
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">{
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">   <span style="color:#0000ff;">throw</span> <span style="color:#0000ff;">new</span> NotSupportedException();
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">}</pre>
</pre>
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;"><span>What is made available to us though is the server side IAsyncResult model. This model is well explained in </span><span lang="EN-US"><a href="http://www.danrigsby.com/blog/index.php/2008/03/26/async-operations-in-wcf-iasyncresult-model-server-side/"><span lang="EN-NZ">this blog post by Dan Rigsby </span></a></span><span>. The methods to use to send messages to BizTalk WCF receive locations are the other two method of BizTalkServiceInstance that implement the IAsyncResult mode class: <b>BeginTwoWayMethod </b>(or BeginOneWayMethod for the IOneWay&#8230; interfaces) and <b>EndTwoWayMethod</b> (or EndOneWayMethod). </span></p>
</p>
</p>
<p class="MsoNormal"><b><span></span></b></p>
<p>&#160;</p>
</p>
</p>
<h2>Sending Messages to the Receive Location</h2>
<p class="MsoNormal"><span>Now that we have a BizTalk receive location and a basic understanding of the WCF receive adapters we can move on to sending a message to it from our .NET code. First add a reference to System.ServiceModel.dll and System.Runtime.Serialization.dll. Our one way receive location uses the ITwoWayAsyncVoid interface (the IOneWay&#8230; interfaces are only for the WCF-NetMsmq adapter, and the ones ending in Tx are for when transactions are enabled on the receive location. Interfaces without Void are for receive response): </span></p>
<pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"><span style="color:#0000ff;">namespace</span> Microsoft.BizTalk.Adapter.Wcf.Runtime
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">{
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">[ServiceContract(Namespace = &quot;<span style="color:#8b0000;">http://www.microsoft.com/biztalk/2006/r2/wcf-adapter</span>&quot;)]
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">interface</span> ITwoWayAsyncVoid
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">{
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#008000;">// Methods</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    [OperationContract(AsyncPattern = <span style="color:#0000ff;">true</span>, IsOneWay = <span style="color:#0000ff;">false</span>, Action = &quot;<span style="color:#8b0000;">*</span>&quot;, ReplyAction = &quot;<span style="color:#8b0000;">*</span>&quot;)]
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    IAsyncResult BeginTwoWayMethod(Message message, AsyncCallback callback, <span style="color:#0000ff;">object</span> state);
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    [OperationContract(IsOneWay = <span style="color:#0000ff;">false</span>, Action = &quot;<span style="color:#8b0000;">BizTalkSubmit</span>&quot;)]
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#0000ff;">void</span> BizTalkSubmit(Message message);
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#0000ff;">void</span> EndTwoWayMethod(IAsyncResult result);
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">}
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">}</pre>
</pre>
</p>
<p class="MsoNormal"><span>You can get the other service contracts from </span><span lang="EN-US"><a href="http://blogs.msdn.com/paolos/archive/2009/05/22/how-to-throw-typed-fault-exceptions-from-orchestrations-published-as-wcf-services.aspx"><span lang="EN-NZ">Paolo’s post</span></a></span><span> or from Microsoft.BizTalk.Adapter.Wcf.Runtime.dll. </span></p>
</p>
</p>
<p class="MsoNormal"><span>Once you have the appropriate service contract interface in your code you can now configure the end point. I added mine to my app’s App.Config file with the address configured on the BizTalk WCF receive location and a binding that follows the one configured there: </span></p>
</p>
</p>
<pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"><span style="color:#0000ff;">&lt;?</span>xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; <span style="color:#0000ff;">?&gt;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">configuration</span><span style="color:#0000ff;">&gt;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">  <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">system.serviceModel</span><span style="color:#0000ff;">&gt;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">bindings</span><span style="color:#0000ff;">&gt;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">      <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">netTcpBinding</span><span style="color:#0000ff;">&gt;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">binding</span> <span style="color:#ff0000;">name</span>=<span style="color:#0000ff;">&quot;NetTcpBinding_ITwoWayAsyncVoid&quot;</span><span style="color:#0000ff;">&gt;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">          <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">security</span> <span style="color:#ff0000;">mode</span> =<span style="color:#0000ff;">&quot;None&quot;</span> <span style="color:#0000ff;">/&gt;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">binding</span><span style="color:#0000ff;">&gt;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">      <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">netTcpBinding</span><span style="color:#0000ff;">&gt;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">bindings</span><span style="color:#0000ff;">&gt;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">client</span><span style="color:#0000ff;">&gt;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">      <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">endpoint</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#ff0000;">address</span>=<span style="color:#0000ff;">&quot;net.tcp://bt09standalone.thiago.com/WCFNetTcpGenericReceive&quot;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#ff0000;">binding</span>=<span style="color:#0000ff;">&quot;netTcpBinding&quot;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#ff0000;">bindingConfiguration</span>=<span style="color:#0000ff;">&quot;NetTcpBinding_ITwoWayAsyncVoid&quot;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#ff0000;">contract</span>=<span style="color:#0000ff;">&quot;Microsoft.BizTalk.Adapter.Wcf.Runtime.ITwoWayAsyncVoid&quot;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#ff0000;">name</span>=<span style="color:#0000ff;">&quot;BlogWCFGenericReceiver&quot;</span> <span style="color:#0000ff;">/&gt;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">client</span><span style="color:#0000ff;">&gt;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">  <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">system.serviceModel</span><span style="color:#0000ff;">&gt;</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">configuration</span><span style="color:#0000ff;">&gt;</span></pre>
</pre>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>Here is the BeginTwoWayMethod method declaration for the ITwoWayAsyncVoid interface: </span></p>
</p>
</p>
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;"><span></span></p>
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;">
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;">
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;">
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;"><span></span></p>
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;"><span></span></p>
<pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">[OperationBehavior]
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">IAsyncResult ITwoWayAsyncVoid.BeginTwoWayMethod(Message message, AsyncCallback callback, <span style="color:#0000ff;">object</span> state);
</pre>
</pre>
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;"><span></span></p>
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;"><span>You pass it a WCF message, and can also pass an async callback method so that the main thread isn’t blocked. You can also pass in an object in the state parameter and you will get the same object back once the callback method is called. </span></p>
</p>
</p>
<p class="MsoNormal"><span>Alternatively from passing in a callback method you can just tell the wait handle to block the current thread until a signal is received – once it is received this is when BizTalk is ready for you to call the EndTwoWayMethod. </span></p>
</p>
</p>
<p class="MsoNormal"><span>Here is the method in my windows forms app that sends a message to BizTalk and uses the wait handle to wait for a signal: </span></p>
</p>
</p>
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;"><span></span></p>
<pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"><span style="color:#0000ff;">private</span> <span style="color:#0000ff;">void</span> btnSubmitWaitHandle_Click(<span style="color:#0000ff;">object</span> sender, EventArgs e)
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">{
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"></pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    txtResults.Text += DateTime.Now.TimeOfDay.ToString()
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">                         + &quot;<span style="color:#8b0000;"> Sending message to BizTalk\r\n</span>&quot;;
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    DisableForm();
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"></pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#0000ff;">try</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    {
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        cf = <span style="color:#0000ff;">new</span> ChannelFactory&lt;ITwoWayAsyncVoid&gt;(&quot;<span style="color:#8b0000;">BlogWCFGenericReceiver</span>&quot;);
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        cf.Open();
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        ITwoWayAsyncVoid waitHandleProxy = cf.CreateChannel();
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"></pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        btnSubmitWaitHandle.Enabled = <span style="color:#0000ff;">false</span>;
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"></pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        Channels.Message msg =
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">            Channels.Message.CreateMessage(Channels.MessageVersion.Default,
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">            &quot;<span style="color:#8b0000;">BeginTwoWayMethod</span>&quot;, <span style="color:#0000ff;">new</span> XmlTextReader(<span style="color:#0000ff;">new</span> StringReader(txtMessage.Text)));
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"></pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#008000;">//Start the call to BizTalk and get the async result back</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        IAsyncResult res = waitHandleProxy.BeginTwoWayMethod(msg, <span style="color:#0000ff;">null</span>, <span style="color:#0000ff;">null</span>);
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"></pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#008000;">//Blocks current thread until until AsyncWaitHandle receives a signal</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        res.AsyncWaitHandle.WaitOne();
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"></pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#008000;">//End the call once the wait handle signal is received from BizTalk</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        waitHandleProxy.EndTwoWayMethod(res);
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"></pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        txtResults.Text += DateTime.Now.TimeOfDay.ToString() +
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">            &quot;<span style="color:#8b0000;"> Message sent successfully\r\n</span>&quot;;
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        cf.Close();
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    }
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#0000ff;">catch</span> (Exception ex)
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    {
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        txtResults.Text += DateTime.Now.TimeOfDay.ToString()
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">          + &quot;<span style="color:#8b0000;"> Exception: </span>&quot; + ex.Message + &quot;<span style="color:#8b0000;">\r\n</span>&quot;;
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#0000ff;">if</span> (cf != <span style="color:#0000ff;">null</span>) { cf.Abort(); }
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"></pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    }
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#0000ff;">finally</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    {
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        EnableForm();
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#0000ff;">if</span> (cf.State == CommunicationState.Opened)
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        { cf.Close(); }
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    }
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">}</pre>
</pre>
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;"><span></span></p>
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;"><span>And here are the two methods that send a message to BizTalk using the callback approach: </span></p>
</p>
</p>
<pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"><span style="color:#0000ff;">private</span> <span style="color:#0000ff;">void</span> btnSubmitAsyncCallback_Click(<span style="color:#0000ff;">object</span> sender, EventArgs e)
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">{
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    cf = <span style="color:#0000ff;">new</span> ChannelFactory&lt;ITwoWayAsyncVoid&gt;(&quot;<span style="color:#8b0000;">BlogWCFGenericReceiver</span>&quot;);
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    cf.Open();
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    asyncCallbackProxy = cf.CreateChannel();
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#0000ff;">string</span> state = Guid.NewGuid().ToString();
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    txtResults.Text += DateTime.Now.TimeOfDay.ToString()
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">                         + &quot;<span style="color:#8b0000;"> Message </span>&quot; + state + &quot;<span style="color:#8b0000;"> sent to BizTalk\r\n</span>&quot;;
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"></pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#008000;">//Create message</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    Channels.Message msg =
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        Channels.Message.CreateMessage(Channels.MessageVersion.Default,
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        &quot;<span style="color:#8b0000;">BeginTwoWayMethod</span>&quot;, <span style="color:#0000ff;">new</span> XmlTextReader(<span style="color:#0000ff;">new</span> StringReader(txtMessage.Text)));
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"></pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#008000;">//Start the call to BizTalk and pass in the async callback method</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    DisableForm();
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    IAsyncResult res = asyncCallbackProxy.BeginTwoWayMethod(
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">       msg, <span style="color:#0000ff;">new</span> System.AsyncCallback(OnEndTwoWayMethod), state);
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">}
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"></pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> OnEndTwoWayMethod(IAsyncResult asyncResult)
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">{
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#008000;">//Get the guid back, this will be what we passed as 'state' on BeginTwoWayMethod</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#0000ff;">string</span> msgid = asyncResult.AsyncState.ToString();
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#0000ff;">try</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    {
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#008000;">//End the call to BizTalk. Make sure it's the same asyncCallbackProxy</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#008000;">//object instance used to send the message otherwise it will fail</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        asyncCallbackProxy.EndTwoWayMethod(asyncResult);
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;"></pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#0000ff;">this</span>.Invoke(<span style="color:#0000ff;">new</span> MethodInvoker(<span style="color:#0000ff;">delegate</span>()
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">            { txtResults.Text += DateTime.Now.TimeOfDay.ToString() +
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">                &quot;<span style="color:#8b0000;"> Message </span>&quot; + msgid + &quot;<span style="color:#8b0000;"> sent successfully\r\n</span>&quot;; }));
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    }
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#0000ff;">catch</span> (Exception ex)
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    {
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#0000ff;">this</span>.Invoke(<span style="color:#0000ff;">new</span> MethodInvoker(<span style="color:#0000ff;">delegate</span>()
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">            { txtResults.Text += DateTime.Now.TimeOfDay.ToString()
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">                + &quot;<span style="color:#8b0000;">Message: </span>&quot;
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">                + msgid + &quot;<span style="color:#8b0000;">. Exception: </span>&quot; + ex.Message + &quot;<span style="color:#8b0000;">\r\n</span>&quot;; }));
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#0000ff;">if</span> (cf != <span style="color:#0000ff;">null</span>) { cf.Abort(); }
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    }
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    <span style="color:#0000ff;">finally</span>
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    {
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#0000ff;">this</span>.Invoke(<span style="color:#0000ff;">new</span> MethodInvoker(<span style="color:#0000ff;">delegate</span>()
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        { EnableForm(); }));
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        <span style="color:#0000ff;">if</span> (cf.State == CommunicationState.Opened)
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">        { cf.Close(); }
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">    }
</pre>
<pre style="font-size:12px;width:100%;font-family:consolas,&#39;background-color:#ffffff;margin:0;">}</pre>
</pre>
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;"><span></span></p>
<p class="MsoNormal" style="margin-bottom:0;line-height:normal;"><span>That’s it! We can now send any XML message to BizTalk this way. Here’s what my tester application looks like after two messages were sent with the WaitHandle and once with the callback approach: </span></p>
</p>
</p>
<p class="MsoNormal"><a href="http://connectedthoughts.files.wordpress.com/2009/08/image3.png"><img title="image" style="display:inline;border-width:0;" height="540" alt="image" src="http://connectedthoughts.files.wordpress.com/2009/08/image_thumb3.png?w=440&#038;h=540" width="440" border="0" /></a> </p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>If the BizTalk receive location is disabled or the BizTalk host is stopped, you get a <strong>System.ServiceModel.EndpointNotFoundException</strong> exception when calling the </span><span lang="EN-US"><strong>EndTwoWayMethod </strong>method (I removed my machine’s ip address from the exception)</span><span>: </span></p>
</p>
</p>
<p class="MsoNormal"><span><em>“Could not connect to net.tcp://bt09standalone.thiago.com/WCFNetTcpGenericReceive. The connection attempt lasted for a time span of 00:00:02.0141069. TCP error code 10061: No connection could be made because the target machine actively refused it ip address:808.” </em></span></p>
<p><em></em></p>
<p><em></em></p>
<p><em></em></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>What if, for example, we change the Inbound BizTalk message body from Body to Path and enter an invalid path? </span></p>
</p>
</p>
<p class="MsoNormal"><span></span><span></span></p>
</p>
</p>
<p class="MsoNormal"><span>If you have ‘Include exception detail in faults’ enabled you get an exception of type<span>&#160; </span><strong>System.ServiceModel.FaultException&lt;System.ServiceModel.ExceptionDetail&gt;</strong> with the right details: </span></p>
</p>
</p>
<p class="MsoNormal"><span><em>“Unable to find match for inbound body path expression &quot;/nothing&quot; in message.” </em></span></p>
</p>
</p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>I</span><span>f the tickbox is not enabled you get a <strong>System.ServiceModel.FaultException</strong>: </span></p>
</p>
</p>
<p class="MsoNormal"><span><em>“The server was unable to process the request due to an internal error.<span>&#160; </span>For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the &lt;serviceDebug&gt; configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.” </em></span></p>
<p><em></em></p>
<p><em></em></p>
<p><em></em></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>I</span><span>f you untick the ‘Suspend request message on failure’ and there is an exception in the pipeline, the message doesn’t get suspended and the client gets the error back when ‘Include exception detail in faults’ is ticked: </span></p>
</p>
</p>
<p class="MsoNormal"><span><em>“There was a failure executing the receive pipeline: &quot;Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot; Source: &quot;XML disassembler&quot; Receive Port: &quot;Blog.GenericReceive&quot; URI: &quot;net.tcp://localhost/WCFNetTcpGenericReceive&quot; Reason: Finding the document specification by message type &quot;http://Blog.GenericReceiver.BT/Schemas#aGenericReceiverSample&quot; failed. Verify the schema deployed properly. ” </em></span></p>
<p><em></em></p>
<p><em></em></p>
<p><em></em></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>So there you have it, another way of submitting any XML messages to BizTalk by using the WCF channel model. </span></p>
</p>
</p>
<p class="MsoNormal"><span></span></p>
<p>&#160;</p>
</p>
<p class="MsoNormal"><span lang="EN-US"><a href="http://www.acsug.co.nz/files/Downloads/Blog-GenericReceiver.aspx"><span lang="EN-NZ">Download the sample code</span></a></span><span> </span></p>
</p>
</p>
<p class="MsoNormal"><span></span></p>
<p>&#160;</p>
</p>
<p class="MsoNormal"><span>Regards, </span></p>
</p>
</p>
<p class="MsoNormal"><span>Thiago Almeida </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedthoughts.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedthoughts.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedthoughts.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedthoughts.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedthoughts.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedthoughts.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedthoughts.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedthoughts.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedthoughts.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedthoughts.wordpress.com/344/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=344&subd=connectedthoughts&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedthoughts.wordpress.com/2009/08/09/sending-xml-messages-to-biztalk-using-the-wcf-channel-model/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8f5dbd52b07e1626609604032d7934f9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Thiago</media:title>
		</media:content>

		<media:content url="http://connectedthoughts.files.wordpress.com/2009/08/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://connectedthoughts.files.wordpress.com/2009/08/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://connectedthoughts.files.wordpress.com/2009/08/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://connectedthoughts.files.wordpress.com/2009/08/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Issue 7 of BizTalk HotRod Magazine is out</title>
		<link>http://connectedthoughts.wordpress.com/2009/08/07/issue-7-of-biztalk-hotrod-magazine-is-out/</link>
		<comments>http://connectedthoughts.wordpress.com/2009/08/07/issue-7-of-biztalk-hotrod-magazine-is-out/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 20:56:20 +0000</pubDate>
		<dc:creator>Thiago Almeida</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://connectedthoughts.wordpress.com/2009/08/07/issue-7-of-biztalk-hotrod-magazine-is-out/</guid>
		<description><![CDATA[Just saw on Rahul’s blog that the latest edition of the BIzTalk HotRod magazine is out, with some great articles on:

 Azure
Testing maps and schemas
Richard Seroter’s &#34;SOA Patterns With BizTalk Server 2009&#34; book review
Throwing typed faults from orchestrations exposed as a WCF service
Integrating BizTalk with Dynamics AX
Managing BizTalk with WMI and C#
BizTalk resources list

Download it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=335&subd=connectedthoughts&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just saw on <a href="http://blogs.msdn.com/rgarg/archive/2009/08/06/some-great-articles-in-this-edition-of-biztalk-hotrod.aspx">Rahul’s blog</a> that the latest edition of the BIzTalk HotRod magazine is out, with some great articles on:</p>
<ul>
<li> Azure</li>
<li>Testing maps and schemas</li>
<li>Richard Seroter’s &quot;SOA Patterns With BizTalk Server 2009&quot; book review</li>
<li>Throwing typed faults from orchestrations exposed as a WCF service</li>
<li>Integrating BizTalk with Dynamics AX</li>
<li>Managing BizTalk with WMI and C#</li>
<li>BizTalk resources list</li>
</ul>
<p><a href="http://biztalkhotrod.com/Documents/Issue7_Q3_2009.pdf">Download it here!</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedthoughts.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedthoughts.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedthoughts.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedthoughts.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedthoughts.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedthoughts.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedthoughts.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedthoughts.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedthoughts.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedthoughts.wordpress.com/335/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedthoughts.wordpress.com&blog=1770135&post=335&subd=connectedthoughts&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedthoughts.wordpress.com/2009/08/07/issue-7-of-biztalk-hotrod-magazine-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8f5dbd52b07e1626609604032d7934f9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Thiago</media:title>
		</media:content>
	</item>
	</channel>
</rss>