<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>benCode</title>
	<atom:link href="http://bencode.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bencode.wordpress.com</link>
	<description>Ben Simmonds: Sharing the Microsoft Love &#124; BizTalk, SharePoint and Dynamics</description>
	<lastBuildDate>Mon, 25 Apr 2011 07:44:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='bencode.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>benCode</title>
		<link>http://bencode.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://bencode.wordpress.com/osd.xml" title="benCode" />
	<atom:link rel='hub' href='http://bencode.wordpress.com/?pushpress=hub'/>
		<item>
		<title>WordPress Blog and ASP.NET MVC Integration</title>
		<link>http://bencode.wordpress.com/2010/12/05/wordpress-blog-and-asp-net-mvc-integration/</link>
		<comments>http://bencode.wordpress.com/2010/12/05/wordpress-blog-and-asp-net-mvc-integration/#comments</comments>
		<pubDate>Sun, 05 Dec 2010 03:32:05 +0000</pubDate>
		<dc:creator>beness</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[LINQ to XML]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">https://bencode.wordpress.com/2010/12/05/wordpress-blog-and-asp-net-mvc-integration/</guid>
		<description><![CDATA[This was too easy/cool to keep tucked away. I wanted the most cheap and cheerful way of listing the top 10 blog posts, into a larger, containing website I am building for a client. I started out by Googling (googeloper) “wordpress integration c#”. Unexpectedly, nothing obvious I was looking for surfaced. Most solution seemed to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=115&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This was too easy/cool to keep tucked away. I wanted the most cheap and cheerful way of listing the top 10 blog posts, into a larger, containing website I am building for a client. I started out by Googling (googeloper) “wordpress integration c#”. Unexpectedly, nothing obvious I was looking for surfaced. Most solution seemed to rely on having WordPress installed physically beneath the website, or proposed options such as FTP based integration. Yuck! No. I just wanted the 10 latest posts in real time (i.e. as of now). Hold on I thought, that’s exactly what feeds have been designed to do. Blog engines (such as WordPress) have excellent <a href="http://codex.wordpress.org/WordPress_Feeds">feed support</a>, including a <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">REST based API</a>, support for <a href="http://en.wikipedia.org/wiki/RSS">RSS</a> and <a href="http://en.wikipedia.org/wiki/Atom_(standard)">Atom</a>. Wowzers.</p>
<p>There is plenty of good information about those topics elsewhere. I really just wanted to demonstrate how simple it is to query such a feed taking a server side approach (assuming your web server has Internet HTTP GET access to the feed). To do this, I used System.Net.WebClient, LINQ to XML and ASP.NET MVC 3. The feed I am consuming is for a WordPress blog, but there is absolutely no dependency/coupling that the blog must be WordPress based. It could for example, be a Blogger feed. </p>
<p>Another factor that should be given consideration is whether taking a server side (e.g. ASP.NET) approach versus a client side (e.g. jQuery) approach is a better fit for you. If for example search engine visibility (SEO) of the integrated blog content is important to you, a server side approach may be a better fit.</p>
<p>1. Using a browser review the feed you’re targeting. For example, if the (WordPress) blog is <a href="http://foobar.wordpress.com">http://example.com</a> then have a look at <a title="http://example.com/feed/" href="http://example.com/feed/">http://example.com/feed/</a> or <a href="http://example.com/feed/atom">http://example.com/feed/atom</a>. Below is a sample of the first chunk of Atom feed for this WordPress blog.</p>
<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;feed
  xmlns=&quot;http://www.w3.org/2005/Atom&quot;
  xmlns:thr=&quot;http://purl.org/syndication/thread/1.0&quot;
  xml:lang=&quot;en&quot;
  xml:base=&quot;http://bencode.net/wp-atom.php&quot;
  xmlns:georss=&quot;http://www.georss.org/georss&quot; xmlns:geo=&quot;http://www.w3.org/2003/01/geo/wgs84_pos#&quot;  &gt;
	&lt;title type=&quot;text&quot;&gt;benCode&lt;/title&gt;
	&lt;subtitle type=&quot;text&quot;&gt;Ben Simmonds: BizTalk Server Guy in Sydney&lt;/subtitle&gt;

	&lt;updated&gt;2010-11-24T02:03:03Z&lt;/updated&gt;

	&lt;link rel=&quot;alternate&quot; type=&quot;text/html&quot; href=&quot;http://bencode.net&quot; /&gt;
	&lt;id&gt;http://bencode.net/feed/atom/&lt;/id&gt;
	&lt;link rel=&quot;self&quot; type=&quot;application/atom+xml&quot; href=&quot;http://bencode.net/feed/atom/&quot; /&gt;

	&lt;generator uri=&quot;http://wordpress.com/&quot;&gt;WordPress.com&lt;/generator&gt;
&lt;link rel=&quot;search&quot; type=&quot;application/opensearchdescription+xml&quot; href=&quot;http://bencode.net/osd.xml&quot; title=&quot;benCode&quot; /&gt;
&lt;link rel=&quot;search&quot; type=&quot;application/opensearchdescription+xml&quot; href=&quot;http://wordpress.com/opensearch.xml&quot; title=&quot;WordPress.com&quot; /&gt;
	&lt;link rel='hub' href='http://bencode.net/?pushpress=hub' /&gt;
		&lt;entry&gt;
		&lt;author&gt;
			&lt;name&gt;beness&lt;/name&gt;
						&lt;uri&gt;http://www.bencode.net/&lt;/uri&gt;
					&lt;/author&gt;
		&lt;title type=&quot;html&quot;&gt;&lt;![CDATA[SSO Configuration Road Block]]&gt;&lt;/title&gt;
		&lt;link rel=&quot;alternate&quot; type=&quot;text/html&quot; href=&quot;http://bencode.net/2010/11/24/sso-configuration-road-block/&quot; /&gt;
		&lt;id&gt;https://bencode.wordpress.com/2010/11/24/sso-configuration-road-block/&lt;/id&gt;
		&lt;updated&gt;2010-11-24T02:03:03Z&lt;/updated&gt;
		&lt;published&gt;2010-11-24T01:58:25Z&lt;/published&gt;
		&lt;category scheme=&quot;http://bencode.net&quot; term=&quot;BizTalk&quot; /&gt;&lt;category scheme=&quot;http://bencode.net&quot; term=&quot;SSO&quot; /&gt;&lt;category scheme=&quot;http://bencode.net&quot; term=&quot;Error&quot; /&gt;		&lt;summary type=&quot;html&quot;&gt;&lt;![CDATA[Recently I’ve had the need to setup a BizTalk Server 2006 R2 virtual machine. Quietly confident about my experience with this version of BizTalk, I jumped in head first to *quickly* get a simple single server based installation configured on a 32-bit VMWare based VM. Lesson learned today…never, ever underestimate the obscure errors that BizTalk [...]&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=bencode.net&amp;amp;blog=2452880&amp;amp;post=109&amp;amp;subd=bencode&amp;amp;ref=&amp;amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;]]&gt;&lt;/summary&gt;
		&lt;content type=&quot;html&quot; xml:base=&quot;http://bencode.net/2010/11/24/sso-configuration-road-block/&quot;&gt;&lt;![CDATA[&lt;p&gt;Recently I’ve had the need to setup a BizTalk Server 2006 R2 virtual machine. Quietly confident about my experience with this version of BizTalk, I jumped in head first to *quickly* get a simple single server based installation configured on a 32-bit VMWare based VM.&lt;/p&gt;</pre>
<p>2. Below is a snippet of simple C# that leverages <a href="http://msdn.microsoft.com/en-us/library/bb387098.aspx">LINQ to XML</a> to parse an Atom feed. This code is in a controllers action method, because of ASP.NET MVC, but again this code has no requirement for you to be using MVC. Side note: LINQ to XML makes working with XML much more fluid for the C#/VB developer. Very very nice to use!</p>
<pre>public ActionResult Index()
{
  XNamespace xsd = &quot;http://www.w3.org/2005/Atom&quot;;
  var client = new WebClient();
  var feed = client.DownloadString(&quot;http://www.bencode.net/feed/atom&quot;);
  var document = XDocument.Parse(feed);
  var blogs =
    from e in document.Descendants(xsd + &quot;entry&quot;)
    select new BlogModel()
    {
      Title = (string)e.Element(xsd + &quot;title&quot;),
      Content = new HtmlString((string)e.Element(xsd + &quot;content&quot;))
    };
  return View(blogs);
}</pre>
<p>3. A simple MVC 3 Razor view:</p>
<pre>
@model IEnumerable&lt;MvcApplication.Model.BlogModel&gt;

@{
    View.Title = "Blogs";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

&lt;h1&gt;Blogs&lt;/h1&gt;

@foreach (var blog in Model) {
&lt;div class="blogpost"&gt;
  &lt;h2&gt;@blog.Title&lt;/h2&gt;
  &lt;p&gt;@blog.Content&lt;/p&gt;
&lt;/div&gt;
}
</pre>
<p>4. Downloading, streaming, parsing and rendering this feed should be considered an expensive operation. Something that you probably don’t want to happen for each request that comes in for your page/site. To cache this entire “pipeline” of work, I went with some ASP.NET MVC output caching, by marking up the controller action with the following custom attribute:</p>
<pre>
[OutputCache(VaryByParam=&quot;none&quot;, Duration=60)]
public ActionResult Index()
{
  ...
</pre>
<p>The result:</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:8747F07C-CDE8-481f-B0DF-C6CFD074BF67:d1172b2a-c37d-46ea-87c3-89cac3e9ef6d" class="wlWriterEditableSmartContent"><a href="http://bencode.files.wordpress.com/2010/12/blog-8x6.png" title="" rel="thumbnail"><img border="0" src="http://bencode.files.wordpress.com/2010/12/blog.png?w=339&#038;h=207" width="339" height="207" /></a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bencode.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bencode.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bencode.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bencode.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bencode.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bencode.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bencode.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bencode.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bencode.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bencode.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bencode.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bencode.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bencode.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bencode.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=115&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bencode.wordpress.com/2010/12/05/wordpress-blog-and-asp-net-mvc-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3ada90695f79642d443a1857bb11b048?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beness</media:title>
		</media:content>

		<media:content url="http://bencode.files.wordpress.com/2010/12/blog.png" medium="image" />
	</item>
		<item>
		<title>SSO Configuration Road Block</title>
		<link>http://bencode.wordpress.com/2010/11/24/sso-configuration-road-block/</link>
		<comments>http://bencode.wordpress.com/2010/11/24/sso-configuration-road-block/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 01:58:25 +0000</pubDate>
		<dc:creator>beness</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[SSO]]></category>

		<guid isPermaLink="false">https://bencode.wordpress.com/2010/11/24/sso-configuration-road-block/</guid>
		<description><![CDATA[Recently I’ve had the need to setup a BizTalk Server 2006 R2 virtual machine. Quietly confident about my experience with this version of BizTalk, I jumped in head first to *quickly* get a simple single server based installation configured on a 32-bit VMWare based VM. Lesson learned today…never, ever underestimate the obscure errors that BizTalk [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=109&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I’ve had the need to setup a BizTalk Server 2006 R2 virtual machine. Quietly confident about my experience with this version of BizTalk, I jumped in head first to *quickly* get a simple single server based installation configured on a 32-bit VMWare based VM.</p>
<p>Lesson learned today…never, ever underestimate the obscure errors that BizTalk Server can produce. The install was smooth sailing. But when the time came to configure SSO, this:</p>
<blockquote><p>Failed to generate and backup the master secret to file: C:\Program Files\Common Files\Enterprise Single Sign-On\SSO07AB.bak (SSO) Additional Information (0&#215;80070005) Access is Denied.</p>
</blockquote>
<p>I wracked my brain for a previous solution to this, but never have I seen this. There is <a href="http://blogical.se/blogs/mikael_sand/archive/2009/10/01/failed-to-create-the-master-secret-file-why-do-these-things-always-happen-to-me.aspx">speculation</a> this may be a very rare bug that arises only in the context of doing single server VM based configurations. Regardless of the cause, it is not helpful.</p>
<p>Thank you to <a href="http://blogical.se/blogs/mikael_sand/archive/2009/10/01/failed-to-create-the-master-secret-file-why-do-these-things-always-happen-to-me.aspx">Mikael Sand</a>, for detailing the solution to this. Un-configure and manually blast away any features and/or databases the configuration tool may have created. Create the two groups “SSO Administrators” and “SSO Affiliate Administrators” (alternatively name them whatever you like) manually. Add the account you are running the configuration tool under, and the BizTalk service account to these newly created groups. Log off. Re-run the configuration tool.</p>
<p>Sheesh!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bencode.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bencode.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bencode.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bencode.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bencode.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bencode.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bencode.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bencode.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bencode.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bencode.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bencode.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bencode.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bencode.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bencode.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=109&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bencode.wordpress.com/2010/11/24/sso-configuration-road-block/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3ada90695f79642d443a1857bb11b048?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beness</media:title>
		</media:content>
	</item>
		<item>
		<title>BizTalk Server 2010 Prerequisite CAB Files</title>
		<link>http://bencode.wordpress.com/2010/10/03/biztalk-server-2010-redistributable-cab-files/</link>
		<comments>http://bencode.wordpress.com/2010/10/03/biztalk-server-2010-redistributable-cab-files/#comments</comments>
		<pubDate>Sun, 03 Oct 2010 03:34:26 +0000</pubDate>
		<dc:creator>beness</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[BizTalk 2010 Prerequisite CAB Redistributable]]></category>

		<guid isPermaLink="false">https://bencode.wordpress.com/2010/10/03/biztalk-server-2010-redistributable-cab-files/</guid>
		<description><![CDATA[Exciting times! BizTalk Server 2010 is out and as per every major release of the product there are a fresh set of redistributable CAB links to hunt down. These links available from the official installation guides. &#160; Windows Server 2008 and 2008 R2 Language Windows Server 2008 32-bit Edition Windows Server 2008 64-bit Edition Windows [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=93&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Exciting times! BizTalk Server 2010 is out and as per every major release of the product there are a fresh set of redistributable CAB links to hunt down. These links available from the <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b77d6a4f-8b41-470e-a58c-730dc5859b38&amp;displaylang=en">official installation guides</a>.</p>
<p>&#160;</p>
<p>Windows Server 2008 and 2008 R2</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="295">
<p><b>Language</b></p>
</td>
<td valign="top" width="295">
<p><b>Windows Server 2008 32-bit Edition</b></p>
</td>
<td valign="top" width="295">
<p><b>Windows Server 2008 64-bit Edition</b></p>
</td>
<td valign="top" width="295">
<p><b>Windows Server 2008 R2</b></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>EN</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0x409">http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0&#215;409</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0x409">http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0&#215;409</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0x409">http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0&#215;409</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>CN</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0x804">http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0&#215;804</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0x804">http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0&#215;804</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0x804">http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0&#215;804</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>DE</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0x407">http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0&#215;407</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0x407">http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0&#215;407</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0x407">http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0&#215;407</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>ES</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0x40a">http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0x40a</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0x40a">http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0x40a</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0x40a">http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0x40a</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>FR</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0x40c">http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0x40c</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0x40c">http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0x40c</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0x40c">http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0x40c</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>IT</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0x410">http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0&#215;410</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0x410">http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0&#215;410</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0x410">http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0&#215;410</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>JA</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0x411">http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0&#215;411</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0x411">http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0&#215;411</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0x411">http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0&#215;411</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>KO</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0x412">http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0&#215;412</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0x412">http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0&#215;412</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0x412">http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0&#215;412</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>TW</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0x404">http://go.microsoft.com/fwlink/?LinkID=189407&amp;clcid=0&#215;404</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0x404">http://go.microsoft.com/fwlink/?LinkID=189408&amp;clcid=0&#215;404</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0x404">http://go.microsoft.com/fwlink/?LinkID=189409&amp;clcid=0&#215;404</a></p>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>Windows Vista and 7 64-bit Editions</p>
<p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="295">
<p><b>Language</b></p>
</td>
<td valign="top" width="295">
<p><b>Windows 7</b></p>
</td>
<td valign="top" width="295">
<p><b>Windows Vista</b></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>EN</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0x409">http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0&#215;409</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0x409">http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0&#215;409</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>CN</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0x804">http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0&#215;804</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0x804">http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0&#215;804</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>DE</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0x407">http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0&#215;407</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0x407">http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0&#215;407</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>ES</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0x40a">http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0x40a</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0x40a">http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0x40a</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>FR</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0x40c">http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0x40c</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0x40c">http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0x40c</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>IT</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0x410">http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0&#215;410</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0x410">http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0&#215;410</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>JA</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0x411">http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0&#215;411</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0x411">http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0&#215;411</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>KO</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0x412">http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0&#215;412</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189405clcid=0x412">http://go.microsoft.com/fwlink/?LinkID=189405clcid=0&#215;412</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>TW</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0x404">http://go.microsoft.com/fwlink/?LinkID=189404&amp;clcid=0&#215;404</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0x404">http://go.microsoft.com/fwlink/?LinkID=189405&amp;clcid=0&#215;404</a></p>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>Windows Vista and 7 32-bit Editions</p>
<p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="295">
<p><b>Language</b></p>
</td>
<td valign="top" width="295">
<p><b>Windows 7</b></p>
</td>
<td valign="top" width="295">
<p><b>Windows Vista</b></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>EN</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0x409">http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0&#215;409</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0x409">http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0&#215;409</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>CN</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0x804">http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0&#215;804</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0x804">http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0&#215;804</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>DE</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0x407">http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0&#215;407</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0x407">http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0&#215;407</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>ES</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0x40a">http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0x40a</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0x40a">http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0x40a</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>FR</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0x40c">http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0x40c</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0x40c">http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0x40c</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>IT</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0x410">http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0&#215;410</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0x410">http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0&#215;410</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>JA</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0x411">http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0&#215;411</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0x411">http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0&#215;411</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>KO</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0x412">http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0&#215;412</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189406clcid=0x412">http://go.microsoft.com/fwlink/?LinkID=189406clcid=0&#215;412</a></p>
</td>
</tr>
<tr>
<td valign="top" width="295">
<p>TW</p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0x404">http://go.microsoft.com/fwlink/?LinkID=189403&amp;clcid=0&#215;404</a></p>
</td>
<td valign="top" width="295">
<p><a href="http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0x404">http://go.microsoft.com/fwlink/?LinkID=189406&amp;clcid=0&#215;404</a></p>
</td>
</tr>
</tbody>
</table>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bencode.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bencode.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bencode.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bencode.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bencode.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bencode.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bencode.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bencode.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bencode.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bencode.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bencode.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bencode.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bencode.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bencode.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=93&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bencode.wordpress.com/2010/10/03/biztalk-server-2010-redistributable-cab-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3ada90695f79642d443a1857bb11b048?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beness</media:title>
		</media:content>
	</item>
		<item>
		<title>BizTalk Servers Slow First Hit</title>
		<link>http://bencode.wordpress.com/2010/08/02/biztalk-server-slow-startups/</link>
		<comments>http://bencode.wordpress.com/2010/08/02/biztalk-server-slow-startups/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 13:10:10 +0000</pubDate>
		<dc:creator>beness</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[first request]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[slow]]></category>
		<category><![CDATA[startup]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">https://bencode.wordpress.com/2010/08/02/biztalk-server-slow-startups/</guid>
		<description><![CDATA[Lately I been thinking about BizTalk Server, and a particular behavior that it consistently demonstrates without fail. It takes a dreadful amount of time to service a “cold” request, however once “warmed”, it hums. Its challenging at best to justify this behavior to a technology ignorant client. Without getting too deep into BizTalk Servers internals [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=90&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Lately I been thinking about BizTalk Server, and a particular behavior that it consistently demonstrates without fail. It takes a dreadful amount of time to service a “cold” request, however once “warmed”, it hums.</p>
<p>Its challenging at best to justify this behavior to a technology ignorant client.</p>
<p>Without getting too deep into BizTalk Servers internals (I would love to spend some time with windbg and the SOS extension digging around), I wanted a way to have partial control over how BizTalk Server manages the actual processes that invoke the code we make. All mainstream BizTalk artefacts (orchestrations, maps, pipelines) boil down to managed code (IL). BizTalk consumes our crafted “business” assemblies (dll’s) by loaded them into its address space through one or more AppDomain’s, at which time the messaging engine can call out to them when it sees fit.</p>
<p>This spawns a number of related questions; how many dll’s per appdomain? Under what conditions does an appdomain’s get “garbage collected” by the messaging engine? And so on. So I digged a little deeper.</p>
<p>Thanks to <a href="http://www.winterdom.com/weblog/">Tomas Restrepo</a> for posting the excellent MSDN link to <a href="http://msdn.microsoft.com/en-us/library/aa578610.aspx">Orchestration Engine Configuration</a>, which in essence sums up everything I wished for. Basically it involves hacking the BTSNTSvc.exe.config, which host instances take into account when started. While you can do cool things like control dehydration behaviour, and more, I was more interested in this:</p>
<blockquote><p>Assemblies are assigned to named domains using assignment rules (see more below). If no rule is specified for some assembly, the assembly will be assigned to an ad hoc domain. The number of such assigned assemblies per ad hoc domain is determined by the value of AssembliesPerDomain.</p>
</blockquote>
<p>Which translates to this in btsntsvc.exe.config:</p>
<pre class="csharpcode">&lt;AppDomains AssembliesPerDomain=<span class="str">&quot;10&quot;</span>&gt;
   &lt;AppDomainSpecs&gt;
      &lt;AppDomainSpec Name=<span class="str">&quot;FooDomain&quot;</span> SecondsIdleBeforeShutdown=<span class="str">&quot;-1&quot;</span> SecondsEmptyBeforeShutdown=<span class="str">&quot;-1&quot;</span> /&gt;
   &lt;/AppDomainSpecs&gt;
   &lt;ExactAssignmentRules&gt;
      &lt;ExactAssignmentRule AssemblyName=<span class="str">&quot;Foo.Orchestration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9f3a0f87e62e465c&quot;</span> AppDomainName=<span class="str">&quot;FooDomain&quot;</span> /&gt;
   &lt;/ExactAssignmentRules&gt;
&lt;/AppDomains&gt;</pre>
<p>The interesting properties SecondsEmptyBeforeShutdown and SecondsIdleBeforeShutdown, are defined as follows:</p>
<p>SecondsEmptyBeforeShutdown is the number of seconds that an app domain is empty (that is, it does not contain any orchestrations) before being unloaded. Specify -1 to signal that an app domain should never unload, even when empty.<br />
  <br />SecondsIdleBeforeShutdown is the number of seconds that an app domain is idle (that is, it contains only dehydratable orchestrations) before being unloaded. Specify -1 to signal that an app domain should never unload when idle but not empty. When an idle but non-empty domain is shut down, all of the contained instances are dehydrated first.</p>
<p>Thanks to Mick Badran, who has posted a handy <a href="http://blogs.breezetraining.com.au/mickb/2006/08/10/BTSNTSvcexeConfigSettingsMoreCompleteAndHandy.aspx">BTSNTSvc.exe.config template</a>, which includes the AppDomain configuration section discussed above.</p>
<p>UPDATE: Here’s a copy of my own *no frills* template:</p>
<pre class="csharpcode"><span class="kwrd">&lt;?</span><span class="html">xml</span> <span class="attr">version</span><span class="kwrd">=&quot;1.0&quot;</span> ?<span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">configuration</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">configSections</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">section</span> <span class="attr">name</span><span class="kwrd">=&quot;xlangs&quot;</span> <span class="attr">type</span><span class="kwrd">=&quot;Microsoft.XLANGs.BizTalk.CrossProcess.XmlSerializationConfigurationSectionHandler, Microsoft.XLANGs.BizTalk.CrossProcess&quot;</span> <span class="kwrd">/&gt;</span>
  <span class="kwrd">&lt;/</span><span class="html">configSections</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">system.net</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">connectionManagement</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">address</span><span class="kwrd">=&quot;*&quot;</span> <span class="attr">maxconnection</span><span class="kwrd">=&quot;48&quot;</span><span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">connectionManagement</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;/</span><span class="html">system.net</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">runtime</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">assemblyBinding</span> <span class="attr">xmlns</span><span class="kwrd">=&quot;urn:schemas-microsoft-com:asm.v1&quot;</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">probing</span> <span class="attr">privatePath</span><span class="kwrd">=&quot;BizTalk Assemblies;Developer Tools;Tracking;Tracking\interop&quot;</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">assemblyBinding</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;/</span><span class="html">runtime</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">system.runtime.remoting</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">channelSinkProviders</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">serverProviders</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">provider</span> <span class="attr">id</span><span class="kwrd">=&quot;sspi&quot;</span> <span class="attr">type</span><span class="kwrd">=&quot;Microsoft.BizTalk.XLANGs.BTXEngine.SecurityServerChannelSinkProvider,Microsoft.XLANGs.BizTalk.Engine&quot;</span> <span class="attr">securityPackage</span><span class="kwrd">=&quot;ntlm&quot;</span> <span class="attr">authenticationLevel</span><span class="kwrd">=&quot;packetPrivacy&quot;</span> <span class="kwrd">/&gt;</span>
      <span class="kwrd">&lt;/</span><span class="html">serverProviders</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">channelSinkProviders</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">application</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">channels</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">channel</span> <span class="attr">ref</span><span class="kwrd">=&quot;tcp&quot;</span> <span class="attr">port</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">name</span><span class="kwrd">=&quot;&quot;</span><span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span><span class="html">serverProviders</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">provider</span> <span class="attr">ref</span><span class="kwrd">=&quot;sspi&quot;</span> <span class="kwrd">/&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">formatter</span> <span class="attr">ref</span><span class="kwrd">=&quot;binary&quot;</span> <span class="attr">typeFilterLevel</span><span class="kwrd">=&quot;Full&quot;</span><span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;/</span><span class="html">serverProviders</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">channel</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;/</span><span class="html">channels</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">application</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;/</span><span class="html">system.runtime.remoting</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">xlangs</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">Configuration</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">AppDomains</span> <span class="attr">AssembliesPerDomain</span><span class="kwrd">=&quot;10&quot;</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">AppDomainSpecs</span><span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span><span class="html">AppDomainSpec</span> <span class="attr">Name</span><span class="kwrd">=&quot;FooDomain&quot;</span> <span class="attr">SecondsIdleBeforeShutdown</span><span class="kwrd">=&quot;-1&quot;</span> <span class="attr">SecondsEmptyBeforeShutdown</span><span class="kwrd">=&quot;-1&quot;</span> <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;</span><span class="html">AppDomainSpec</span> <span class="attr">Name</span><span class="kwrd">=&quot;BarDomain&quot;</span> <span class="attr">SecondsIdleBeforeShutdown</span><span class="kwrd">=&quot;-1&quot;</span> <span class="attr">SecondsEmptyBeforeShutdown</span><span class="kwrd">=&quot;-1&quot;</span> <span class="kwrd">/&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">AppDomainSpecs</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">PatternAssignmentRules</span><span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span><span class="html">PatternAssignmentRule</span> <span class="attr">AssemblyNamePattern</span><span class="kwrd">=&quot;Net.benCode.Foo.*, Version=\d.\d.\d.\d, Culture=neutral, PublicKeyToken=.{16}&quot;</span> <span class="attr">AppDomainName</span><span class="kwrd">=&quot;FooDomain&quot;</span> <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;</span><span class="html">PatternAssignmentRule</span> <span class="attr">AssemblyNamePattern</span><span class="kwrd">=&quot;Net.benCode.Bar.*, Version=\d.\d.\d.\d, Culture=neutral, PublicKeyToken=.{16}&quot;</span> <span class="attr">AppDomainName</span><span class="kwrd">=&quot;BarDomain&quot;</span> <span class="kwrd">/&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">PatternAssignmentRules</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;/</span><span class="html">AppDomains</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">Configuration</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;/</span><span class="html">xlangs</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">configuration</span><span class="kwrd">&gt;</span></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bencode.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bencode.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bencode.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bencode.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bencode.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bencode.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bencode.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bencode.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bencode.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bencode.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bencode.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bencode.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bencode.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bencode.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=90&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bencode.wordpress.com/2010/08/02/biztalk-server-slow-startups/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3ada90695f79642d443a1857bb11b048?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beness</media:title>
		</media:content>
	</item>
		<item>
		<title>BizTalk Server 2009 Unit Testing</title>
		<link>http://bencode.wordpress.com/2010/06/13/biztalk-server-2009-unit-testing/</link>
		<comments>http://bencode.wordpress.com/2010/06/13/biztalk-server-2009-unit-testing/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 15:54:02 +0000</pubDate>
		<dc:creator>beness</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://bencode.wordpress.com/2010/06/13/biztalk-server-2009-unit-testing/</guid>
		<description><![CDATA[I feel like i’ve missed the boat with this, but the “first class” unit testing support that has been added to BizTalk Server 2009 is terrific. Unit testing with BizTalk Server up to this point, has always been very involved and custom. How was this ground breaking feat made possible? A project level build switch [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=88&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p align="justify">I feel like i’ve missed the boat with this, but the “first class” unit testing support that has been added to BizTalk Server 2009 is terrific. Unit testing with BizTalk Server up to this point, has always been very involved and custom.</p>
<p align="justify">How was this ground breaking feat made possible? A project level build switch has been added to all Visual Studio BizTalk project types. Check it out, bring project properties up for any BizTalk 2009 project in your solution, and there will be an “Enable Unit Testing” true/false flag sitting there.</p>
<p align="justify">Setting this to true, instructs the BizTalk MSBuild tasks that take our precious BizTalk artefacts like orchestrations, maps, pipelines and so on and parses and compiles them into MSIL, to add an extra layer of inheritance between for example, our pipeline and the real BizTalk pipeline base class. A whole family of these new “intermediate” testable classes live in the <font size="2" face="Courier New">Microsoft.BizTalk.TestTools.dll</font> assembly (available under c:\Program Files(x86)\Microsoft BizTalk Server 2009\Developer Tools\) such as <font size="2" face="Courier New">Microsoft.BizTalk.TestTools.Pipeline.TestableReceivePipeline</font> and <font size="2" face="Courier New">Microsoft.BizTalk.TestTools.Map.TestableMap</font>.</p>
<p align="justify">Now the level resistance to getting effective unit tests up an running is so low, there really is no excuse not to have good repeatable unit tests across all your BizTalk artefacts.</p>
<p>Here’s a small snippet (intended for use as an MSTest unit test) that invokes a BizTalk map, and verifies the resulting output using some LINQ to XML.</p>
<p align="left"><font size="2" face="Courier New">[TestClass]     <br />public class MapTests      <br />{      <br />&#160; public MapTests() { } </font></p>
<p align="left"><font size="2" face="Courier New">&#160; public TestContext TestContext { get; set; } </font></p>
<p align="left"><font size="2" face="Courier New">&#160; [TestMethod]     <br />&#160; public void Foo_To_Bar()      <br />&#160; {      <br />&#160;&#160;&#160; TestableMapBase map = new Foo_To_Bar();      <br />&#160;&#160;&#160; map.ValidateInput = false;      <br />&#160;&#160;&#160; map.ValidateOutput = false;      <br />&#160;&#160;&#160; map.TestMap(      <br />&#160;&#160;&#160;&#160;&#160; &quot;input.xml&quot;,      <br />&#160;&#160;&#160;&#160;&#160; InputInstanceType.Xml,      <br />&#160;&#160;&#160;&#160;&#160; &quot;output.xml&quot;,      <br />&#160;&#160;&#160;&#160;&#160; OutputInstanceType.XML); </font></p>
<p align="left"><font size="2" face="Courier New">&#160;&#160;&#160; var document = XDocument.Load(&quot;output.xml&quot;); </font></p>
<p align="left"><font size="2" face="Courier New">&#160;&#160;&#160; string interchangeId =      <br />&#160;&#160;&#160;&#160;&#160; (from header in document.Descendants(&quot;Header&quot;)      <br />&#160;&#160;&#160;&#160;&#160;&#160; select (string)header.Element(&quot;InterchangeId&quot;)).Single(); </font></p>
<p align="left"><font size="2" face="Courier New">&#160;&#160;&#160; Assert.IsTrue(interchangeId.Length &gt; 0);     <br />&#160; }      <br />}</font></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bencode.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bencode.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bencode.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bencode.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bencode.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bencode.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bencode.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bencode.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bencode.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bencode.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bencode.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bencode.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bencode.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bencode.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=88&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bencode.wordpress.com/2010/06/13/biztalk-server-2009-unit-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3ada90695f79642d443a1857bb11b048?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beness</media:title>
		</media:content>
	</item>
		<item>
		<title>Back To Basics: Sharing Libraries in a Team</title>
		<link>http://bencode.wordpress.com/2010/06/13/back-to-basics-sharing-libraries-in-a-team/</link>
		<comments>http://bencode.wordpress.com/2010/06/13/back-to-basics-sharing-libraries-in-a-team/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 15:01:20 +0000</pubDate>
		<dc:creator>beness</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://bencode.wordpress.com/2010/06/13/back-to-basics-sharing-libraries-in-a-team/</guid>
		<description><![CDATA[When developing in a team consisting of more members than yourself, you’ll quickly run into the scenario where shared libraries and/or other similar resources need to be shared in someway. Its especially nice when you can cleanly compile code freshly pulled from source control. In my opinion, this is a must. Sloppiness here can cause [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=83&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When developing in a team consisting of more members than yourself, you’ll quickly run into the scenario where shared libraries and/or other similar resources need to be shared in someway.</p>
<p>Its especially nice when you can cleanly compile code freshly pulled from source control. In my opinion, this is a must. Sloppiness here can cause heartache throughout the the entire development lifecycle of the project. This problem is aggravated with the introduction of new starters that come on board…they do a get latest, build and spend the next few days crawling through hundreds of build errors.</p>
<p>So what to do with all those third party assemblies that have made their way into the code base? If Alice added the references on her box, checks in, Bob is not going to be happy when he goes to do a “get latest”.</p>
<p>Its at this point most environments i’ve worked within take the laziest and simpliest option. “Hey everyone, we need to make that we all bind source control to the same local working folder (e.g. c:\projects\) mmmkay?”. If everyone has a local working folder of c:\projects, then absolute dll’s references should resolve just fine. While this is simple and can work, is rarely documented beyond the developers that came up with the plan.</p>
<p>What alternatives are there? Several, they all involve adding a layer of indirection, so the physical location of the assemblies is abstracted away from the project references. The simplest and effective strategy I have seen leverages <a href="http://en.wikipedia.org/wiki/Subst">subst</a> (or the more modern symbolic linking support now available in Vista and higher using mklink). The idea is in source control, maintain a hive of pre-built assemblies that are common across the team, for example:</p>
<p><font size="2" face="Courier New">$/Foo.Common.Hive/NUnit.Framework/1.1.23.0/NUnit.Framework.dll     <br />$/Foo.Common.Hive/bLogical.Shared.Functoids/1.0.0.0/bLogical.Shared.Functoids.dll      <br />…</font></p>
<p>Bind them to a physical location *anywhere* on your development/build box. Run the following command:</p>
<p><font size="2" face="Courier New">subst q: c:\local\location\of\your\choice\</font></p>
<p>This will create a virtual drive (q:) on the machine that actually resolves to the contents of the “c:\local\location\of\your\choice\” directory. Visual Studio assembly reference’s should be added through the virtual (q:) drive – hence adding a layer of abstraction. The only catch is all developers need to ensure that the virtual drive is subst’ed prior to building—however on the plus side, I can put the source where I like, and the chances of getting a clean build have been improved significantly.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bencode.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bencode.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bencode.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bencode.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bencode.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bencode.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bencode.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bencode.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bencode.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bencode.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bencode.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bencode.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bencode.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bencode.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=83&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bencode.wordpress.com/2010/06/13/back-to-basics-sharing-libraries-in-a-team/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3ada90695f79642d443a1857bb11b048?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beness</media:title>
		</media:content>
	</item>
		<item>
		<title>Back To Basics: Managing Databases</title>
		<link>http://bencode.wordpress.com/2010/06/05/back-to-basics-managing-databases/</link>
		<comments>http://bencode.wordpress.com/2010/06/05/back-to-basics-managing-databases/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 12:47:03 +0000</pubDate>
		<dc:creator>beness</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Databases]]></category>

		<guid isPermaLink="false">https://bencode.wordpress.com/2010/06/05/back-to-basics-managing-databases/</guid>
		<description><![CDATA[On a new clients site the other day, observed that over time the more companies I work for the deeper my knowledge for applying effective work practices becomes. In other words, over time you see things that work well, and things that don’t. I’m talking about simple practices that when applied to teams result more [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=76&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>On a new clients site the other day, observed that over time the more companies I work for the deeper my knowledge for applying effective work practices becomes. In other words, over time you see things that work well, and things that don’t. I’m talking about simple practices that when applied to teams result more quality and/or efficient software.</p>
<p>Some companies I’ve worked for have demonstrated mature ITIL based change control processes with dedicated change control teams and separate environments for development and testing, but sadly over time they have become so out of sync with the production environment that they provide absolutely no indication of what will happen in the real production environment. And management wonder why production deploys are so unsuccessful having spent gazillions on ITIL training and manuals. A simple problem with a simple solution, but in the real world can be rarely practiced.</p>
<p>Another that I see regularly is an effective way of managing database change across a development team. Here I present a technique so primitive and proven, that there is no requirement that you have the database tooling that ships with the likes of Visual Studio Team System (VSTS) 2008 Database Edition or Redgate SQL Compare. If a team has such tools at their disposal then great use them—they can make life easier, but I am dumbfounded by the number of environments I see where database change is completely unmanaged.</p>
<p>Yes, databases and their associated artefacts (functions, triggers, message broker queues and so on) should be managed, and versioned. Again a simple problem with a simple solution, but in the real world tends to be practiced poorly.</p>
<p>In the source repository that the team uses, create a directory hierarchy that implies some sort of sequence (e.g. prefix with a numeral). Start off with scripting the database and its requirements, such as filegroup options and collation types etc. Remove any code generated guff, to keep the scripts as clean and as readable as possible. Then move on to tables, and then objects that work with the tables such as foreign keys, triggers, procedures, functions. An example structure could look like this:</p>
<p>- “01Database”    <br />- “02 Tables”     <br />- “03 Foreign Keys”     <br />- “04 Triggers”     <br />- “05 Stored Procedures”     <br />- “06 Functions”     <br />- “07 Queues”     <br />- …     <br />- “10 Data”</p>
<p>Over the lifecycle of the project this structure should be completely populated with the necessary artifacts to build the target database from scratch. No restoration of backups needed.</p>
<p>Because the number of scripts contained in a single directory could become overwhelming with time, a copy of the below batch script “all.bat” could be placed in each directory that enumerates and concatenates every “.sql” file in the containing directory to produce one large sql script “all.sql”. Running in 150 stored procedure scripts then become a simple matter as running in “all.sql” contained in the stored procedure hive.</p>
<pre class="csharpcode">@echo off

@rem type NUL&gt;<span class="str">&quot;_all.sql&quot;</span>
del /F /Q <span class="str">&quot;_all.sql&quot;</span>

<span class="kwrd">for</span> /f %%a <span class="kwrd">in</span> (<span class="str">'dir /b *.sql'</span>) <span class="kwrd">do</span> (
type %%a &gt;&gt; _all.sql
)</pre>
<p>When it comes to scripting the data (lookup data and sample data should be versioned), I find it hard to pass up the simplicity of the <a href="http://vyaskn.tripod.com/code.htm">sp_generate_inserts</a> gem I found a few years ago. Its basically a stored procedure that get created in your master database (therefore resolvable in any db’s on the same instance), that provides a rich set of options for scripting your data (e.g. <font size="2" face="Courier New">EXECUTE sp_generate_inserts footable, @ommit_identity=1</font>).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bencode.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bencode.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bencode.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bencode.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bencode.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bencode.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bencode.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bencode.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bencode.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bencode.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bencode.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bencode.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bencode.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bencode.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=76&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bencode.wordpress.com/2010/06/05/back-to-basics-managing-databases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3ada90695f79642d443a1857bb11b048?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beness</media:title>
		</media:content>
	</item>
		<item>
		<title>Subversion Repository</title>
		<link>http://bencode.wordpress.com/2010/04/17/subversion-repository/</link>
		<comments>http://bencode.wordpress.com/2010/04/17/subversion-repository/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 03:52:31 +0000</pubDate>
		<dc:creator>beness</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://bencode.wordpress.com/2010/04/17/subversion-repository/</guid>
		<description><![CDATA[I’ve been working on a number of personal projects lately and need a reliable, fast and possibly multi-user source control. There are many of options available, but for me VS.NET integration is a must. Without focusing too much on my rational for choosing SVN, there are two fairly mature and rich VS.NET providers; AnkhSVN and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=65&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I’ve been working on a number of personal projects lately and need a reliable, fast and possibly multi-user source control. There are many of options available, but for me VS.NET integration is a must. Without focusing too much on my rational for choosing SVN, there are two fairly mature and rich VS.NET providers; <a href="http://ankhsvn.open.collab.net/">AnkhSVN</a> and <a href="http://www.visualsvn.com/">VisualSVN</a>. I use VisualSVN and it rocks.</p>
<p>Follows is the fastest path to getting a repository up and running over the native SVN protocol (which by default listens on port 3690).</p>
<ol>
<li>
<div align="left">Download pre-built binaries from <a href="http://www.open.collab.net/products/subversion/">CollabNet</a> (I had <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> compatibility issues with other distributions such as <a href="http://www.sliksvn.com/">SlikSVN</a>).</div>
</li>
<li>
<div align="left">Create the repository: <font size="2" face="Courier New">svnadmin create “c:\svn\repository”</font></div>
</li>
<li>
<div align="left">Edit conf/snvserve.conf. Uncomment the lines (anon-access = read, auth-access = write, password-db = passwd)</div>
</li>
<li>
<div align="left">Edit conf/passwd. Register users and their passwords here.</div>
</li>
<li>
<div align="left">Register Windows services (daemon): <font size="2" face="Courier New">sc create svnserver binpath= &quot;C:\Program Files (x86)\CollabNet\Subversion Server\svnserve.exe &#8211;service -r c:\svn\repository&quot;          <br />displayname= &quot;Subversion&quot; depend= Tcpip start= auto</font></div>
</li>
</ol>
<p>That’s it! Just connect to svn://localhost using TortoiseSVN and/or the other VS.NET providers. Remember to open up port 3690 to make the repository available over a network.</p>
<p>I find setting up the TTB (tags/trunk/branches) style structure initially pays off downstream, when activity like tagging or branching starts taking place.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:801f8539-c196-4120-9d8b-228355a93cce" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/subversion" rel="tag">subversion</a>,<a href="http://technorati.com/tags/source+control" rel="tag">source control</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bencode.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bencode.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bencode.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bencode.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bencode.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bencode.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bencode.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bencode.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bencode.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bencode.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bencode.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bencode.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bencode.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bencode.wordpress.com/65/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=65&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bencode.wordpress.com/2010/04/17/subversion-repository/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3ada90695f79642d443a1857bb11b048?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beness</media:title>
		</media:content>
	</item>
		<item>
		<title>Azure BizSpark Camp</title>
		<link>http://bencode.wordpress.com/2010/04/12/azure-bizspark-camp/</link>
		<comments>http://bencode.wordpress.com/2010/04/12/azure-bizspark-camp/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 11:24:00 +0000</pubDate>
		<dc:creator>beness</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[BizSpark]]></category>
		<category><![CDATA[BizSparkAu]]></category>

		<guid isPermaLink="false">https://bencode.wordpress.com/2010/06/05/azure-bizspark-camp/</guid>
		<description><![CDATA[Last month I was invited to attend the Azure BizSpark Camp in Sydney. Given minimal detail about the event, 7 small Australian startups pitched business concepts to Microsoft, and were selected to compete for the prize of 5G’s of cold hard cash, a sturdy glass trophy that could do some serious damage in a fight, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=74&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Last month I was invited to attend the Azure BizSpark Camp in Sydney. Given minimal detail about the event, 7 small Australian startups pitched business concepts to Microsoft, and were selected to compete for the prize of 5G’s of cold hard cash, a sturdy glass trophy that could do some serious damage in a fight, and potential exposure to some real concrete venture capital investors (“VC’s” for short if you’re the hip businessy type) – i.e. people willing to throw cash at your business concept with the intent of making more money in return.</p>
<p>The teams started to arrive at Microsoft’s Australian headquarters at North Ryde Sydney around 8:30AM on Saturday morning. I knew I was at the right place when I saw a 20 strong group of pasty looking nerds all armed (laptops) for a big weekend ahead.</p>
<p>Soon after registering, Chris Auld (an enthusiastic yellow croc wearing kiwi) from <a href="http://www.intergen.co.nz">Intergen</a> smashed the ice, by delivering a condensed presentation on Microsoft Azure, and the general principles behind scalable cloud architectures. Chris even tossed out a few gems throughout his presentation, some of which included; frequent use of the word “choice”, XNA text books, an excel based Azure cost forecasting calculator, a colorful debate on the evils of GPL, some YSLOW techniques to reduce HTTP pressure such as CSS sprites, the shift in thinking that the cloud promotes such as, the movement away from traditional transactional relational storage to “NoSQL” highly replicated non-transactional storage models, the renewed importance that good multi-threaded code (e.g. Parallel.For) has now with the likes of Azure worker roles and so on, a thought stimulating project called <a href="http://code.google.com/p/lokad-cloud/">lokad-cloud</a> which is pitches itself as a .NET O/C (object to cloud) mapper for Windows Azure, and much more!</p>
<p>After a solid and inspiring 3 hour effort from Chris, he wrapped up his presentation, and Catherine Eibner from Microsoft ran us through the broad agenda for what the remainder of the weekend would entail. The way I translated Catherine’s instructions were roughly as follows: “now you guys are Azure experts, go and build something Azure’y and awesome. By the way, you have a hard deadline of 4:00PM tomorrow evening, by which time you will then be given 5 minutes to deliver a business pitch to a panel of 5 judges. Now get the hell out of here bitches!”. It quickly loomed over me I wouldn&#8217;t be seeing much of my girlfriend this weekend.</p>
<p>My <a href="http://www.biztorque.net/">friend</a> and I quickly found a vacant meeting room, a white board, and setup up shop.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:8747F07C-CDE8-481f-B0DF-C6CFD074BF67:5f2a538d-4927-4c87-ad24-170ea1e5982d" class="wlWriterEditableSmartContent"><a href="http://bencode.files.wordpress.com/2010/06/4507467824_a8dbb948848x6.jpg" title="" rel="thumbnail"><img border="0" src="http://bencode.files.wordpress.com/2010/06/4507467824_a8dbb94884.png?w=353&#038;h=289" width="353" height="289" /></a></div>
<p>24 hours (2 worker roles, 1 web role and some Azure Blog and Table storage) later…</p>
<p>We’d built out the first working prototype of a concept known as eyeknowit running on a local Azure development fabric. Think of photo streams combined with information. From this overarching idea stems a number of downstream ideas, like being able to acquire imagery tagged with particular things (e.g. the need for a particular type of photo for a newspaper), or being able to specialise the photo stream to a particular expertise (e.g. I have a interest in flowers).</p>
</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:8747F07C-CDE8-481f-B0DF-C6CFD074BF67:dea90052-819f-4902-86b8-23ac8ad42407" class="wlWriterEditableSmartContent"><a href="http://bencode.files.wordpress.com/2010/06/4509758967_b4c215b1fb8x6.jpg" title="" rel="thumbnail"><img border="0" src="http://bencode.files.wordpress.com/2010/06/4509758967_b4c215b1fb.png?w=345&#038;h=278" width="345" height="278" /></a></div>
</p>
<p>I guess the judges thought the idea could gain some traction. We won.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:8747F07C-CDE8-481f-B0DF-C6CFD074BF67:d5096f45-bc92-456d-8795-a39ad4d86e81" class="wlWriterEditableSmartContent"><a href="http://bencode.files.wordpress.com/2010/06/4513033060_c2f446e2118x6.jpg" title="" rel="thumbnail"><img border="0" src="http://bencode.files.wordpress.com/2010/06/4513033060_c2f446e211.png?w=344&#038;h=256" width="344" height="256" /></a></div>
<p>In summary, at zero cost (other than time, sleep and daylight) to attendees, got some “choice” training from Chris Auld, geeked out on Azure for a whole weekend, met some good people, and took some cash and a slightly inflated ego away.</p>
</p>
</p>
<p><a href="http://blog.bartjellema.com/2010/04/11/azure-bizspark-camp-sydney/">http://blog.bartjellema.com/2010/04/11/azure-bizspark-camp-sydney/</a></p>
<p><a href="http://blogs.msdn.com/b/ausdev/archive/2010/04/12/bizspark-camp-australia.aspx">http://blogs.msdn.com/b/ausdev/archive/2010/04/12/bizspark-camp-australia.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bencode.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bencode.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bencode.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bencode.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bencode.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bencode.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bencode.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bencode.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bencode.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bencode.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bencode.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bencode.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bencode.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bencode.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=74&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bencode.wordpress.com/2010/04/12/azure-bizspark-camp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3ada90695f79642d443a1857bb11b048?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beness</media:title>
		</media:content>

		<media:content url="http://bencode.files.wordpress.com/2010/06/4507467824_a8dbb94884.png" medium="image" />

		<media:content url="http://bencode.files.wordpress.com/2010/06/4509758967_b4c215b1fb.png" medium="image" />

		<media:content url="http://bencode.files.wordpress.com/2010/06/4513033060_c2f446e211.png" medium="image" />
	</item>
		<item>
		<title>C# 3.0 Language Extensions</title>
		<link>http://bencode.wordpress.com/2008/12/25/c-30-language-extensions/</link>
		<comments>http://bencode.wordpress.com/2008/12/25/c-30-language-extensions/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 07:50:26 +0000</pubDate>
		<dc:creator>beness</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://bencode.wordpress.com/2008/12/25/c-30-language-extensions/</guid>
		<description><![CDATA[Put together a little snippet to remind myself of the some of the beautiful language extensions that shipped with the C# language. namespace CSharpLanguageExperiment{&#160;&#160;&#160; using System;&#160;&#160;&#160; using System.Collections.Generic;&#160;&#160;&#160; using System.Linq; &#160;&#160;&#160; class Program&#160;&#160;&#160; {&#160;&#160;&#160;&#160;&#160;&#160;&#160; static void Main(string[] args)&#160;&#160;&#160;&#160;&#160;&#160;&#160; {&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Object Initialiser&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Person bill = new Person { FirstName = &#8220;Bill&#8221;, LastName = &#8220;Gates&#8221;, Age [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=61&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Put together a little snippet to remind myself of the some of the beautiful language extensions that shipped with the C# language.</p>
<p align="left"><font face="Courier New" size="2">namespace CSharpLanguageExperiment<br />{<br />&nbsp;&nbsp;&nbsp; using System;<br />&nbsp;&nbsp;&nbsp; using System.Collections.Generic;<br />&nbsp;&nbsp;&nbsp; using System.Linq; </font></p>
<p align="left"><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp; class Program<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; static void Main(string[] args)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Object Initialiser<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Person bill = new Person { FirstName = &#8220;Bill&#8221;, LastName = &#8220;Gates&#8221;, Age = 40 }; </font></p>
<p align="left"><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Type Inference<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var ben = new Person { FirstName = &#8220;Ben&#8221;, LastName = &#8220;Simmonds&#8221;, Age = 25 }; </font></p>
<p align="left"><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Anonymous Types<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var john = new { FirstName = &#8220;John&#8221;, LastName = &#8220;Smith&#8221;, Age = 18 }; </font></p>
<p align="left"><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Anonymous Delegate<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Func&lt;string, bool&gt; filter1 = delegate(string name)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return name.Length &gt; 4;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filter1(&#8220;hel&#8221;); </font></p>
<p align="left"><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Lambda Expression<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Func&lt;string, bool&gt; filter2 = x =&gt; x.Length &gt; 4;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filter2(&#8220;foobar&#8221;); </font></p>
<p align="left"><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Extension Method<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ben.GetData(); </font></p>
<p align="left"><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Queries<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; List&lt;Person&gt; people = new List&lt;Person&gt;();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; people.Add(bill);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; people.Add(ben);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Func&lt;Person, bool&gt; filter = x =&gt; x.Age &gt; 30;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IEnumerable&lt;Person&gt; exp = people.Where(filter); </font></p>
<p align="left"><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (Person person in exp)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine(person.GetData());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; } </font></p>
<p align="left"><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp; public class Person<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string FirstName { get; set; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string LastName { get; set; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public int Age { get; set; } </font></p>
<p align="left"><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public override string ToString()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return String.Format(&#8220;{0} {1}&#8221;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FirstName,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LastName);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; } </font></p>
<p align="left"><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp; // Extension Method<br />&nbsp;&nbsp;&nbsp; public static class PersonExtension<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static string GetData(this Person person)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return String.Format(&#8220;Name: {0} {1} Age: {2}&#8221;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; person.FirstName,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; person.LastName,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; person.Age);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; }<br />}</font></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bencode.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bencode.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bencode.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bencode.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bencode.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bencode.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bencode.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bencode.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bencode.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bencode.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bencode.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bencode.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bencode.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bencode.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bencode.wordpress.com&amp;blog=2452880&amp;post=61&amp;subd=bencode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bencode.wordpress.com/2008/12/25/c-30-language-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3ada90695f79642d443a1857bb11b048?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beness</media:title>
		</media:content>
	</item>
	</channel>
</rss>
