<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>Jason Foster's Blog - wonderings</title>
    <link>http://blog.jasonfoster.com/</link>
    <description>various and sundry thoughts on life, technology, and stuff</description>
    <language>en-us</language>
    <copyright>Jason C. Foster</copyright>
    <lastBuildDate>Sun, 11 Nov 2007 05:55:13 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.6264.0</generator>
    <managingEditor>blog@jasonfoster.com</managingEditor>
    <webMaster>blog@jasonfoster.com</webMaster>
    <item>
      <trackback:ping>http://blog.jasonfoster.com/Trackback.aspx?guid=0156457f-8895-42b8-a5c4-bc83e29a2fc3</trackback:ping>
      <pingback:server>http://blog.jasonfoster.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.jasonfoster.com/PermaLink,guid,0156457f-8895-42b8-a5c4-bc83e29a2fc3.aspx</pingback:target>
      <dc:creator>Jason Foster!</dc:creator>
      <wfw:comment>http://blog.jasonfoster.com/CommentView,guid,0156457f-8895-42b8-a5c4-bc83e29a2fc3.aspx</wfw:comment>
      <wfw:commentRss>http://blog.jasonfoster.com/SyndicationService.asmx/GetEntryCommentsRss?guid=0156457f-8895-42b8-a5c4-bc83e29a2fc3</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Is Don Box <a href="http://www.pluralsight.com/blogs/dbox/archive/2007/11/10/49001.aspx">saying</a> what
I think he's saying?  That might just give us enough time to get it all downloaded
from MSDN before the parades and football games!
</p>
        <img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=0156457f-8895-42b8-a5c4-bc83e29a2fc3" />
      </body>
      <title>if (Orcas == 11/15/2007) { /* begin download */}</title>
      <guid isPermaLink="false">http://blog.jasonfoster.com/PermaLink,guid,0156457f-8895-42b8-a5c4-bc83e29a2fc3.aspx</guid>
      <link>http://blog.jasonfoster.com/PermaLink,guid,0156457f-8895-42b8-a5c4-bc83e29a2fc3.aspx</link>
      <pubDate>Sun, 11 Nov 2007 05:55:13 GMT</pubDate>
      <description>&lt;p&gt;
Is Don Box &lt;a href="http://www.pluralsight.com/blogs/dbox/archive/2007/11/10/49001.aspx"&gt;saying&lt;/a&gt; what
I think he's saying?&amp;#xA0; That might just give us enough time to get it all downloaded
from MSDN before the parades and football games!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=0156457f-8895-42b8-a5c4-bc83e29a2fc3" /&gt;</description>
      <comments>http://blog.jasonfoster.com/CommentView,guid,0156457f-8895-42b8-a5c4-bc83e29a2fc3.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.jasonfoster.com/Trackback.aspx?guid=7af45e93-cc05-4e52-959e-7ef6ac8e5865</trackback:ping>
      <pingback:server>http://blog.jasonfoster.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.jasonfoster.com/PermaLink,guid,7af45e93-cc05-4e52-959e-7ef6ac8e5865.aspx</pingback:target>
      <dc:creator>Jason Foster!</dc:creator>
      <wfw:comment>http://blog.jasonfoster.com/CommentView,guid,7af45e93-cc05-4e52-959e-7ef6ac8e5865.aspx</wfw:comment>
      <wfw:commentRss>http://blog.jasonfoster.com/SyndicationService.asmx/GetEntryCommentsRss?guid=7af45e93-cc05-4e52-959e-7ef6ac8e5865</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Have you ever had one of those ideas pop in your head that makes you feel stupid and
brilliant at the same time?  I had just such a situation the other day when I
was working to debug some custom tasks I'd written.  The tasks were fairly simple
- checking out and back in some assemblies that had just been compiled during a Team
Build.  
</p>
        <p>
I followed the <a href="http://msdn2.microsoft.com/en-us/library/ms400767(VS.80).aspx">MSDN
documentation</a> for creating a custom task and used the <a href="http://msdn2.microsoft.com/en-us/library/bb130146(VS.80).aspx">TFS
SDK</a> to perform the necessary actions to create pending edits and check in the
changes.  I fired up MSBuild and ran the build locally after deploying my assembly
to the appropriate folder and identifying the task in my build script.  Of course,
things didn't quite go right as the log file showed.  Thinking how easy this
was going to be to fix, I set a breakpoint in the first line of the Execute override
and anticipated the excitement of seeing the debugger spring to life.  
</p>
        <p>
I was running MSBuild at the command prompt and passing in all the parameters that
I needed to run the script.  I switched over to the command prompt, started MSBuild,
then switched back to Studio to attach to the process.  Needless, to say this
wasn't working.  Had I been as bright as I could have been I would have found <a href="http://blogs.msdn.com/msbuild/archive/2005/09/28/474951.aspx">this
article</a> from 2005!!!! and saved myself some heartburn.  Alas, I didn't feed
the Google monster just the right words and all I got in return were bunny trails.  
</p>
        <p>
Left to my own devices I thought if only I had time to attach to the MSBuild process
before my task ran I would be able to catch the breakpoint.  Well, I do know
how to slow something down so I decided to create a new custom task for pausing the
build allowing me enough time to attach to the process and begin the debug prior to
the custom task completing.  I came up with the following:
</p>
        <p>
          <style type="text/css">

.cf { font-family: consolas; font-size: 10pt; color: black; background: white; }.cl { margin: 0px; }.cb1 { color: blue; }.cb2 { color: #2b91af; }</style>
        </p>
        <div class="cf">
          <pre class="cl">    <span class="cb1">public</span><span class="cb1">class</span><span class="cb2">Pause</span> : <span class="cb2">Task</span></pre>
          <pre class="cl">    {</pre>
          <pre class="cl">        <span class="cb1">public</span> Pause()
{ }</pre>
          <pre class="cl"> </pre>
          <pre class="cl">        <span class="cb1">private</span><span class="cb1">int</span> _milliseconds;</pre>
          <pre class="cl">        [<span class="cb2">Required</span>]</pre>
          <pre class="cl">        <span class="cb1">public</span><span class="cb1">int</span> Milliseconds</pre>
          <pre class="cl">        {</pre>
          <pre class="cl">            <span class="cb1">get</span> { <span class="cb1">return</span> _milliseconds;
}</pre>
          <pre class="cl">            <span class="cb1">set</span> {
_milliseconds = <span class="cb1">value</span>; }</pre>
          <pre class="cl">        }</pre>
          <pre class="cl"> </pre>
          <pre class="cl">        <span class="cb1">public</span><span class="cb1">override</span><span class="cb1">bool</span> Execute()</pre>
          <pre class="cl">        {</pre>
          <pre class="cl">            <span class="cb1">if</span> (_milliseconds
&gt; 0)</pre>
          <pre class="cl">            {</pre>
          <pre class="cl">                <span class="cb2">Thread</span>.Sleep(_milliseconds);</pre>
          <pre class="cl">            }</pre>
          <pre class="cl">            <span class="cb1">return</span><span class="cb1">true</span>;</pre>
          <pre class="cl">        }</pre>
          <pre class="cl">    }</pre>
        </div>
        <p>
        </p>
        <p>
I registered the task and called it from my build script right before the custom task
I was trying to debug:
</p>
        <p>
          <style type="text/css">




.cf { font-family: consolas; font-size: 10pt; color: black; background: white; }.cl { margin: 0px; }.cb1 { color: blue; }.cb2 { color: #a31515; }.cb3 { color: red; }</style>
        </p>
        <div class="cf">
          <pre class="cl">
            <span class="cb1">    &lt;</span>
            <span class="cb2">Target</span>
            <span class="cb1">
            </span>
            <span class="cb3">Name</span>
            <span class="cb1">=</span>"<span class="cb1">BeforeCompile</span>"<span class="cb1">&gt;</span></pre>
          <pre class="cl">
            <span class="cb1">        &lt;</span>
            <span class="cb2">Pause</span>
            <span class="cb1">
            </span>
            <span class="cb3">Milliseconds</span>
            <span class="cb1">=</span>"<span class="cb1">20000</span>"<span class="cb1"> /&gt;</span></pre>
          <pre class="cl">
            <span class="cb1">        &lt;</span>
            <span class="cb2">Checkout</span>
            <span class="cb1">
            </span>
            <span class="cb3">CheckoutItems</span>
            <span class="cb1">=</span>"<span class="cb1">@(SharedAssembliesPathsToUpdate)</span>"<span class="cb1"> /&gt;</span></pre>
          <pre class="cl">
            <span class="cb1">    &lt;/</span>
            <span class="cb2">Target</span>
            <span class="cb1">&gt;</span>
          </pre>
        </div>
        <p>
        </p>
        <p>
Now I had adequate time to get to the debugger and find my boneheaded mistakes. 
Ended up being an easy change and then things worked great.
</p>
        <p>
Ever the optimist, I commented out the pause task execution and checked in my TFSBuild.proj
file so I could run the build on the build machine.  I kicked off the Team Build
Type in Team Explorer and kaput.  It died before it really began.
</p>
        <p>
Fortunately, I had VS2005 loaded on the build machine so I fired it up, uncommented
my pause task invocation, checked it back in to TFS, kicked off the build, attached
to the MSBuild.exe process that the Team Build Service started and hit my breakpoint. 
The problem ended up being related to the Team Build temporary workspace and some
incorrect assumptions on my part about how it was created and how the mappings would
work.  Once I got that figured out everything ran as expected.
</p>
        <p>
Is this solution elegant?  Probably not.  But it is simple and occasionally
simplicity is elegant in its own right.
</p>
        <p>
P.S. Don't forget to remove any calls to the pause task as this has the obvious side
effect of slowing down your builds!
</p>
        <img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=7af45e93-cc05-4e52-959e-7ef6ac8e5865" />
      </body>
      <title>Debugging Custom Build Tasks in Team Build</title>
      <guid isPermaLink="false">http://blog.jasonfoster.com/PermaLink,guid,7af45e93-cc05-4e52-959e-7ef6ac8e5865.aspx</guid>
      <link>http://blog.jasonfoster.com/PermaLink,guid,7af45e93-cc05-4e52-959e-7ef6ac8e5865.aspx</link>
      <pubDate>Sun, 11 Nov 2007 05:27:19 GMT</pubDate>
      <description>&lt;p&gt;
Have you ever had one of those ideas pop in your head that makes you feel stupid and
brilliant at the same time?&amp;#xA0; I had just such a situation the other day when I
was working to debug some custom tasks I'd written.&amp;#xA0; The tasks were fairly simple
- checking out and back in some assemblies that had just been compiled during a Team
Build.&amp;#xA0; 
&lt;/p&gt;
&lt;p&gt;
I followed the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms400767(VS.80).aspx"&gt;MSDN
documentation&lt;/a&gt; for creating a custom task and used the &lt;a href="http://msdn2.microsoft.com/en-us/library/bb130146(VS.80).aspx"&gt;TFS
SDK&lt;/a&gt; to perform the necessary actions to create pending edits and check in the
changes.&amp;#xA0; I fired up MSBuild and ran the build locally after deploying my assembly
to the appropriate folder and identifying the task in my build script.&amp;#xA0; Of course,
things didn't quite go right as the log file showed.&amp;#xA0; Thinking how easy this
was going to be to fix, I set a breakpoint in the first line of the Execute override
and anticipated the excitement of seeing the debugger spring to life.&amp;#xA0; 
&lt;/p&gt;
&lt;p&gt;
I was running MSBuild at the command prompt and passing in all the parameters that
I needed to run the script.&amp;#xA0; I switched over to the command prompt, started MSBuild,
then switched back to Studio to attach to the process.&amp;#xA0; Needless, to say this
wasn't working.&amp;#xA0; Had I been as bright as I could have been I would have found &lt;a href="http://blogs.msdn.com/msbuild/archive/2005/09/28/474951.aspx"&gt;this
article&lt;/a&gt; from 2005!!!! and saved myself some heartburn.&amp;#xA0; Alas, I didn't feed
the Google monster just the right words and all I got in return were bunny trails.&amp;#xA0; 
&lt;/p&gt;
&lt;p&gt;
Left to my own devices I thought if only I had time to attach to the MSBuild process
before my task ran I would be able to catch the breakpoint.&amp;#xA0; Well, I do know
how to slow something down so I decided to create a new custom task for pausing the
build allowing me enough time to attach to the process and begin the debug prior to
the custom task completing.&amp;#xA0; I came up with the following:
&lt;/p&gt;
&lt;p&gt;
&lt;style type="text/css"&gt;

.cf { font-family: consolas; font-size: 10pt; color: black; background: white; }.cl { margin: 0px; }.cb1 { color: blue; }.cb2 { color: #2b91af; }&lt;/style&gt;
&lt;/p&gt;
&lt;div class="cf"&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0; &lt;span class="cb1"&gt;public&lt;/span&gt; &lt;span class="cb1"&gt;class&lt;/span&gt; &lt;span class="cb2"&gt;Pause&lt;/span&gt; : &lt;span class="cb2"&gt;Task&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0; {&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &lt;span class="cb1"&gt;public&lt;/span&gt; Pause()
{ }&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &lt;span class="cb1"&gt;private&lt;/span&gt; &lt;span class="cb1"&gt;int&lt;/span&gt; _milliseconds;&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; [&lt;span class="cb2"&gt;Required&lt;/span&gt;]&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &lt;span class="cb1"&gt;public&lt;/span&gt; &lt;span class="cb1"&gt;int&lt;/span&gt; Milliseconds&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; {&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &lt;span class="cb1"&gt;get&lt;/span&gt; { &lt;span class="cb1"&gt;return&lt;/span&gt; _milliseconds;
}&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &lt;span class="cb1"&gt;set&lt;/span&gt; {
_milliseconds = &lt;span class="cb1"&gt;value&lt;/span&gt;; }&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; }&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &lt;span class="cb1"&gt;public&lt;/span&gt; &lt;span class="cb1"&gt;override&lt;/span&gt; &lt;span class="cb1"&gt;bool&lt;/span&gt; Execute()&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; {&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &lt;span class="cb1"&gt;if&lt;/span&gt; (_milliseconds
&amp;gt; 0)&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; {&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &lt;span class="cb2"&gt;Thread&lt;/span&gt;.Sleep(_milliseconds);&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; }&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &lt;span class="cb1"&gt;return&lt;/span&gt; &lt;span class="cb1"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; }&lt;/pre&gt;
&lt;pre class="cl"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0; }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
I registered the task and called it from my build script right before the custom task
I was trying to debug:
&lt;/p&gt;
&lt;p&gt;
&lt;style type="text/css"&gt;




.cf { font-family: consolas; font-size: 10pt; color: black; background: white; }.cl { margin: 0px; }.cb1 { color: blue; }.cb2 { color: #a31515; }.cb3 { color: red; }&lt;/style&gt;
&lt;/p&gt;
&lt;div class="cf"&gt;
&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0; &amp;lt;&lt;/span&gt;&lt;span class="cb2"&gt;Target&lt;/span&gt;&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;Name&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;&amp;quot;&lt;span class="cb1"&gt;BeforeCompile&lt;/span&gt;&amp;quot;&lt;span class="cb1"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &amp;lt;&lt;/span&gt;&lt;span class="cb2"&gt;Pause&lt;/span&gt;&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;Milliseconds&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;&amp;quot;&lt;span class="cb1"&gt;20000&lt;/span&gt;&amp;quot;&lt;span class="cb1"&gt; /&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &amp;lt;&lt;/span&gt;&lt;span class="cb2"&gt;Checkout&lt;/span&gt;&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;CheckoutItems&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;&amp;quot;&lt;span class="cb1"&gt;@(SharedAssembliesPathsToUpdate)&lt;/span&gt;&amp;quot;&lt;span class="cb1"&gt; /&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0; &amp;lt;/&lt;/span&gt;&lt;span class="cb2"&gt;Target&lt;/span&gt;&lt;span class="cb1"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Now I had adequate time to get to the debugger and find my boneheaded mistakes.&amp;#xA0;
Ended up being an easy change and then things worked great.
&lt;/p&gt;
&lt;p&gt;
Ever the optimist, I commented out the pause task execution and checked in my TFSBuild.proj
file so I could run the build on the build machine.&amp;#xA0; I kicked off the Team Build
Type in Team Explorer and kaput.&amp;#xA0; It died before it really began.
&lt;/p&gt;
&lt;p&gt;
Fortunately, I had VS2005 loaded on the build machine so I fired it up, uncommented
my pause task invocation, checked it back in to TFS, kicked off the build, attached
to the MSBuild.exe process that the Team Build Service started and hit my breakpoint.&amp;#xA0;
The problem ended up being related to the Team Build temporary workspace and some
incorrect assumptions on my part about how it was created and how the mappings would
work.&amp;#xA0; Once I got that figured out everything ran as expected.
&lt;/p&gt;
&lt;p&gt;
Is this solution elegant?&amp;#xA0; Probably not.&amp;#xA0; But it is simple and occasionally
simplicity is elegant in its own right.
&lt;/p&gt;
&lt;p&gt;
P.S. Don't forget to remove any calls to the pause task as this has the obvious side
effect of slowing down your builds!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=7af45e93-cc05-4e52-959e-7ef6ac8e5865" /&gt;</description>
      <comments>http://blog.jasonfoster.com/CommentView,guid,7af45e93-cc05-4e52-959e-7ef6ac8e5865.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.jasonfoster.com/Trackback.aspx?guid=0e4107c1-7289-458b-a2c2-c78e0c7ca0b5</trackback:ping>
      <pingback:server>http://blog.jasonfoster.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.jasonfoster.com/PermaLink,guid,0e4107c1-7289-458b-a2c2-c78e0c7ca0b5.aspx</pingback:target>
      <dc:creator>Jason Foster!</dc:creator>
      <wfw:comment>http://blog.jasonfoster.com/CommentView,guid,0e4107c1-7289-458b-a2c2-c78e0c7ca0b5.aspx</wfw:comment>
      <wfw:commentRss>http://blog.jasonfoster.com/SyndicationService.asmx/GetEntryCommentsRss?guid=0e4107c1-7289-458b-a2c2-c78e0c7ca0b5</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Microsoft patterns &amp; practices has just delivered an ESB Guidance package for
creating an Enterprise Service Bus using BizTalk Server 2006 R2.  You can read
about it <a href="http://msdn2.microsoft.com/en-us/library/bb931189.aspx#esb_authorsandcontributors">here</a>.
</p>
        <p>
It would be interesting to know if this is in line with the path to <a href="http://www.microsoft.com/presspass/press/2007/oct07/10-30OsloPR.mspx">Oslo</a>. 
Christian Weyer has a <a href="http://blogs.thinktecture.com/cweyer/archive/2007/10/30/414961.aspx">post</a> which
describes some of that vision.  It's interesting that this latest push for formal
SOA from Microsoft (remember EDRA &amp; EDAF?) doesn't appear to explicitly include
an ESB path.
</p>
        <img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=0e4107c1-7289-458b-a2c2-c78e0c7ca0b5" />
      </body>
      <title>Microsoft ESB Guidance for BizTalk Server 2006 R2</title>
      <guid isPermaLink="false">http://blog.jasonfoster.com/PermaLink,guid,0e4107c1-7289-458b-a2c2-c78e0c7ca0b5.aspx</guid>
      <link>http://blog.jasonfoster.com/PermaLink,guid,0e4107c1-7289-458b-a2c2-c78e0c7ca0b5.aspx</link>
      <pubDate>Sat, 10 Nov 2007 06:15:27 GMT</pubDate>
      <description>&lt;p&gt;
Microsoft patterns &amp;amp; practices has just delivered an ESB Guidance package for
creating an Enterprise Service Bus using BizTalk Server 2006 R2.&amp;#xA0; You can read
about it &lt;a href="http://msdn2.microsoft.com/en-us/library/bb931189.aspx#esb_authorsandcontributors"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
It would be interesting to know if this is in line with the path to &lt;a href="http://www.microsoft.com/presspass/press/2007/oct07/10-30OsloPR.mspx"&gt;Oslo&lt;/a&gt;.&amp;#xA0;
Christian Weyer has a &lt;a href="http://blogs.thinktecture.com/cweyer/archive/2007/10/30/414961.aspx"&gt;post&lt;/a&gt; which
describes some of that vision.&amp;#xA0; It's interesting that this latest push for formal
SOA from Microsoft (remember EDRA &amp;amp; EDAF?) doesn't appear to explicitly include
an ESB path.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=0e4107c1-7289-458b-a2c2-c78e0c7ca0b5" /&gt;</description>
      <comments>http://blog.jasonfoster.com/CommentView,guid,0e4107c1-7289-458b-a2c2-c78e0c7ca0b5.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.jasonfoster.com/Trackback.aspx?guid=a0788703-bf2b-4851-bcae-2e6b4e4629b4</trackback:ping>
      <pingback:server>http://blog.jasonfoster.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.jasonfoster.com/PermaLink,guid,a0788703-bf2b-4851-bcae-2e6b4e4629b4.aspx</pingback:target>
      <dc:creator>Jason Foster!</dc:creator>
      <wfw:comment>http://blog.jasonfoster.com/CommentView,guid,a0788703-bf2b-4851-bcae-2e6b4e4629b4.aspx</wfw:comment>
      <wfw:commentRss>http://blog.jasonfoster.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a0788703-bf2b-4851-bcae-2e6b4e4629b4</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've been working a lot with Team Foundation Server lately (2005, unfortunately) doing
builds and have created a bunch of test builds out on my client's TFS.  I knew
the easiest way to delete builds was using the TFSBuild.exe utility but I couldn't
find any help on how to send multiple build numbers to the utility on the command
line.  I saw a couple of references that said to separate them with commas but
that didn't work - it appeared to interpret the concatenated list as one build number.
</p>
        <p>
So, I tried using spaces between each build number and that worked.  Hopefully,
this will help anyone else trying to clean up their build messes.  I have a feeling
things would have been quite a bit easier had I worked in TFS 2008 but my client couldn't
wait until they brought that upgrade into their environment.
</p>
        <p>
Example below: (be sure to use quotes if build names contain spaces)
</p>
        <p>
          <font face="Consolas" size="2">C:\&gt;tfsbuild delete http://tfsserverurl:8080 "Team
Project Name" Development_RC1.3.4 Development_RC1.3.5 Development_RC1.3.6 Development_RC1.3.7
/noprompt</font>
        </p>
        <p>
          <font face="Consolas" size="2">Microsoft (R) TfsBuild Version 8.0.0.0 
<br />
for Microsoft (R) Visual Studio 2005 Team System 
<br />
(C) Copyright 2006 Microsoft Corporation. All rights reserved. </font>
        </p>
        <p>
          <font face="Consolas" size="2">Deleting Development_RC1.3.4... Done </font>
        </p>
        <p>
          <font face="Consolas" size="2">Deleting Development_RC1.3.5... Done </font>
        </p>
        <p>
          <font face="Consolas" size="2">Deleting Development_RC1.3.6... Done </font>
        </p>
        <p>
          <font face="Consolas" size="2">Deleting Development_RC1.3.7... Done</font>
        </p>
        <img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=a0788703-bf2b-4851-bcae-2e6b4e4629b4" />
      </body>
      <title>Deleting Multiple Builds from Team Foundation Server</title>
      <guid isPermaLink="false">http://blog.jasonfoster.com/PermaLink,guid,a0788703-bf2b-4851-bcae-2e6b4e4629b4.aspx</guid>
      <link>http://blog.jasonfoster.com/PermaLink,guid,a0788703-bf2b-4851-bcae-2e6b4e4629b4.aspx</link>
      <pubDate>Mon, 05 Nov 2007 20:25:01 GMT</pubDate>
      <description>&lt;p&gt;
I've been working a lot with Team Foundation Server lately (2005, unfortunately) doing
builds and have created a bunch of test builds out on my client's TFS.&amp;#xA0; I knew
the easiest way to delete builds was using the TFSBuild.exe utility but I couldn't
find any help on how to send multiple build numbers to the utility on the command
line.&amp;#xA0; I saw a couple of references that said to separate them with commas but
that didn't work - it appeared to interpret the concatenated list as one build number.
&lt;/p&gt;
&lt;p&gt;
So, I tried using spaces between each build number and that worked.&amp;#xA0; Hopefully,
this will help anyone else trying to clean up their build messes.&amp;#xA0; I have a feeling
things would have been quite a bit easier had I worked in TFS 2008 but my client couldn't
wait until they brought that upgrade into their environment.
&lt;/p&gt;
&lt;p&gt;
Example below: (be sure to use quotes if build names contain spaces)
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Consolas" size="2"&gt;C:\&amp;gt;tfsbuild delete http://tfsserverurl:8080 &amp;quot;Team
Project Name&amp;quot; Development_RC1.3.4 Development_RC1.3.5 Development_RC1.3.6 Development_RC1.3.7
/noprompt&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Consolas" size="2"&gt;Microsoft (R) TfsBuild Version 8.0.0.0 
&lt;br /&gt;
for Microsoft (R) Visual Studio 2005 Team System 
&lt;br /&gt;
(C) Copyright 2006 Microsoft Corporation. All rights reserved. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Consolas" size="2"&gt;Deleting Development_RC1.3.4... Done &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Consolas" size="2"&gt;Deleting Development_RC1.3.5... Done &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Consolas" size="2"&gt;Deleting Development_RC1.3.6... Done &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Consolas" size="2"&gt;Deleting Development_RC1.3.7... Done&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=a0788703-bf2b-4851-bcae-2e6b4e4629b4" /&gt;</description>
      <comments>http://blog.jasonfoster.com/CommentView,guid,a0788703-bf2b-4851-bcae-2e6b4e4629b4.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.jasonfoster.com/Trackback.aspx?guid=d4d27359-a2cf-4e3a-8118-f14f53dc28f4</trackback:ping>
      <pingback:server>http://blog.jasonfoster.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.jasonfoster.com/PermaLink,guid,d4d27359-a2cf-4e3a-8118-f14f53dc28f4.aspx</pingback:target>
      <dc:creator>Jason Foster!</dc:creator>
      <wfw:comment>http://blog.jasonfoster.com/CommentView,guid,d4d27359-a2cf-4e3a-8118-f14f53dc28f4.aspx</wfw:comment>
      <wfw:commentRss>http://blog.jasonfoster.com/SyndicationService.asmx/GetEntryCommentsRss?guid=d4d27359-a2cf-4e3a-8118-f14f53dc28f4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I can't even begin to count the number of times I've been tracing a problem with some
set of code and realized there was a problem with my understanding of what the .NET
Framework Base Class Library was doing and why.  
</p>
        <p>
Now we'll be able to find out.  Scott Guthrie just <a href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx">announced</a> a
new capability with Visual Studio 2008 and .NET 3.5 for retrieving source for many
of the framework assemblies.
</p>
        <p>
This is huge.  I can't wait to be able to drill into some of the framework without
needing to use Reflector outside the debug bubble.
</p>
        <img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=d4d27359-a2cf-4e3a-8118-f14f53dc28f4" />
      </body>
      <title>Microsoft Releases .NET Framework Source Code</title>
      <guid isPermaLink="false">http://blog.jasonfoster.com/PermaLink,guid,d4d27359-a2cf-4e3a-8118-f14f53dc28f4.aspx</guid>
      <link>http://blog.jasonfoster.com/PermaLink,guid,d4d27359-a2cf-4e3a-8118-f14f53dc28f4.aspx</link>
      <pubDate>Sun, 07 Oct 2007 19:57:56 GMT</pubDate>
      <description>&lt;p&gt;
I can't even begin to count the number of times I've been tracing a problem with some
set of code and realized there was a problem with my understanding of what the .NET
Framework Base Class Library was doing and why.&amp;#xA0; 
&lt;/p&gt;
&lt;p&gt;
Now we'll be able to find out.&amp;#xA0; Scott Guthrie just &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx"&gt;announced&lt;/a&gt; a
new capability with Visual Studio 2008 and .NET 3.5 for retrieving source for many
of the framework assemblies.
&lt;/p&gt;
&lt;p&gt;
This is huge.&amp;#xA0; I can't wait to be able to drill into some of the framework without
needing to use Reflector outside the debug bubble.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=d4d27359-a2cf-4e3a-8118-f14f53dc28f4" /&gt;</description>
      <comments>http://blog.jasonfoster.com/CommentView,guid,d4d27359-a2cf-4e3a-8118-f14f53dc28f4.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.jasonfoster.com/Trackback.aspx?guid=ca82e0fa-b28c-445e-9fc2-13af64112315</trackback:ping>
      <pingback:server>http://blog.jasonfoster.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.jasonfoster.com/PermaLink,guid,ca82e0fa-b28c-445e-9fc2-13af64112315.aspx</pingback:target>
      <dc:creator>Jason Foster!</dc:creator>
      <wfw:comment>http://blog.jasonfoster.com/CommentView,guid,ca82e0fa-b28c-445e-9fc2-13af64112315.aspx</wfw:comment>
      <wfw:commentRss>http://blog.jasonfoster.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ca82e0fa-b28c-445e-9fc2-13af64112315</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">
            <font face="Arial">
            </font>
          </pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">I
built a Windows service to host different processors that work with MSMQ. Each processor
is running in its own AppDomain and needs to fire events to the host service. .NET
remoting is used to wire up the connections between the host process and the processors
as a result of the cross appdomain communication requirement. 
</div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas"> 
</div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">Handling
events in this scenario requires a handler or shim to be used to avoid requiring a
reference to the event subscriber in the event publisher. The shim is simply a broker
or proxy for both sides. I tried to find an example of one that used generics but
was unable to so I decided to come up with one. It's essentially wrapping the built-in
generic <span style="color: teal">EventHandler</span>&lt;T&gt;. This allows any event
argument type to be passed as T. 
</div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas"> 
</div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">Here's
the code: 
</div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px"> </pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">   [<span style="color: teal">Serializable</span>]</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">   <span style="color: blue">public</span><span style="color: blue">class</span><span style="color: teal">RemoteEventShim</span>&lt;T&gt;
: <span style="color: teal">MarshalByRefObject</span><span style="color: blue">where</span> T
: <span style="color: teal">EventArgs</span>, <span style="color: blue">new</span>()</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">   {</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">      <span style="color: blue">public</span><span style="color: blue">override</span><span style="color: blue">object</span> InitializeLifetimeService()</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">      {</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">         <span style="color: blue">return</span><span style="color: blue">null</span>;</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">      }</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px"> </pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">      <span style="color: blue">public</span><span style="color: blue">event</span><span style="color: teal">EventHandler</span>&lt;T&gt;
RemoteEvent;</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px"> </pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">      <span style="color: blue">public</span><span style="color: blue">void</span> RemoteEventHandler(<span style="color: blue">object</span> sender,
T e)</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">      {</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">         <span style="color: teal">EventHandler</span>&lt;T&gt;
handler = RemoteEvent;</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">         <span style="color: blue">if</span> (handler
!= <span style="color: blue">null</span>)</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">         {</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">            handler(sender, e);</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">         }</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">      }</pre>
        </div>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">   }</pre>
        </div>
        <img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=ca82e0fa-b28c-445e-9fc2-13af64112315" />
      </body>
      <title>Generics Based .NET Remoting Event Shim</title>
      <guid isPermaLink="false">http://blog.jasonfoster.com/PermaLink,guid,ca82e0fa-b28c-445e-9fc2-13af64112315.aspx</guid>
      <link>http://blog.jasonfoster.com/PermaLink,guid,ca82e0fa-b28c-445e-9fc2-13af64112315.aspx</link>
      <pubDate>Sat, 21 Apr 2007 20:10:14 GMT</pubDate>
      <description>&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;I
built a Windows service to host different processors that work with MSMQ. Each processor
is running in its own AppDomain and needs to fire events to the host service. .NET
remoting is used to wire up the connections between the host process and the processors
as a result of the cross appdomain communication requirement. 
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;Handling
events in this scenario requires a handler or shim to be used to avoid requiring a
reference to the event subscriber in the event publisher. The shim is simply a broker
or proxy for both sides. I tried to find an example of one that used generics but
was unable to so I decided to come up with one. It's essentially wrapping the built-in
generic &lt;span style="color: teal"&gt;EventHandler&lt;/span&gt;&amp;lt;T&amp;gt;. This allows any event
argument type to be passed as T. 
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;Here's
the code: 
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; [&lt;span style="color: teal"&gt;Serializable&lt;/span&gt;]&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: teal"&gt;RemoteEventShim&lt;/span&gt;&amp;lt;T&amp;gt;
: &lt;span style="color: teal"&gt;MarshalByRefObject&lt;/span&gt; &lt;span style="color: blue"&gt;where&lt;/span&gt; T
: &lt;span style="color: teal"&gt;EventArgs&lt;/span&gt;, &lt;span style="color: blue"&gt;new&lt;/span&gt;()&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;override&lt;/span&gt; &lt;span style="color: blue"&gt;object&lt;/span&gt; InitializeLifetimeService()&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; {&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: blue"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;event&lt;/span&gt; &lt;span style="color: teal"&gt;EventHandler&lt;/span&gt;&amp;lt;T&amp;gt;
RemoteEvent;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; RemoteEventHandler(&lt;span style="color: blue"&gt;object&lt;/span&gt; sender,
T e)&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; {&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="color: teal"&gt;EventHandler&lt;/span&gt;&amp;lt;T&amp;gt;
handler = RemoteEvent;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;if&lt;/span&gt; (handler
!= &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; {&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; handler(sender, e);&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=ca82e0fa-b28c-445e-9fc2-13af64112315" /&gt;</description>
      <comments>http://blog.jasonfoster.com/CommentView,guid,ca82e0fa-b28c-445e-9fc2-13af64112315.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.jasonfoster.com/Trackback.aspx?guid=e1f53d2c-a6f6-46f3-9f15-7fe4924c4729</trackback:ping>
      <pingback:server>http://blog.jasonfoster.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.jasonfoster.com/PermaLink,guid,e1f53d2c-a6f6-46f3-9f15-7fe4924c4729.aspx</pingback:target>
      <dc:creator>Jason Foster!</dc:creator>
      <wfw:comment>http://blog.jasonfoster.com/CommentView,guid,e1f53d2c-a6f6-46f3-9f15-7fe4924c4729.aspx</wfw:comment>
      <wfw:commentRss>http://blog.jasonfoster.com/SyndicationService.asmx/GetEntryCommentsRss?guid=e1f53d2c-a6f6-46f3-9f15-7fe4924c4729</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I seemed to have hit a quirk in the registration of event sinks in the SMTP service. 
As I discussed in this <a title="SMTP Event Sink post" href="http://blog.jasonfoster.com/PermaLink,guid,2bb4a2ea-80b1-47cd-9c27-b61a94a0d4ef.aspx">previous
post</a>, I had a need to create a managed SMTP event sink and worked out all the
kinks in using that to send to a local MSMQ.  Everything has been running great.
</p>
        <p>
However, I needed to install a new version in a side-by-side mode and couldn't for
the life of me get the second assembly to load after registering it with the smtpreg.vbs
utility.  I tried everything I could think of but nothing seemed to work. 
In order to even register I had to create the new version with a different class name
so the ProgID would be unique.  I also had to change the ComVisible attribute
Guid property so that I would have a new ClassID.  All of this was pretty obvious. 
But even after making sure things looked fine in the registry and the IIS metabase
(the actual SMTP sinks are all located in the metabase,) I couldn't get my event sink
to fire.  I was even registering using a unique name for the registration entry
by appending a 2 to the name (e.g. SMTP2MSMQ2 vs. SMTP2MSMQ.)
</p>
        <p>
I had just about given up when I thought I would try prefixing the version to the
registration name vs. appending it.  It worked!  I haven't spent any more
time (I had already spent way too much time on this) to figure out what the heck was
going on but left it up to some weird registration matchup logic due to the name beginning
with the same letters.  You can register the same SinkClass multiple times to
manage different patterns of email addresses, etc. but apparently the same name with
different SinkClasses is a no-no.
</p>
        <img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=e1f53d2c-a6f6-46f3-9f15-7fe4924c4729" />
      </body>
      <title>SMTP Event Sink Registration Problem</title>
      <guid isPermaLink="false">http://blog.jasonfoster.com/PermaLink,guid,e1f53d2c-a6f6-46f3-9f15-7fe4924c4729.aspx</guid>
      <link>http://blog.jasonfoster.com/PermaLink,guid,e1f53d2c-a6f6-46f3-9f15-7fe4924c4729.aspx</link>
      <pubDate>Tue, 10 Apr 2007 06:31:52 GMT</pubDate>
      <description>&lt;p&gt;
I seemed to have hit a quirk in the registration of event sinks in the SMTP service.&amp;nbsp;
As I discussed in this &lt;a title="SMTP Event Sink post" href="http://blog.jasonfoster.com/PermaLink,guid,2bb4a2ea-80b1-47cd-9c27-b61a94a0d4ef.aspx"&gt;previous
post&lt;/a&gt;, I had a need to create a managed SMTP event sink and worked out all the
kinks in using that to send to a local MSMQ.&amp;nbsp; Everything has been running great.
&lt;/p&gt;
&lt;p&gt;
However, I needed to install a new version in a side-by-side mode and couldn't for
the life of me get the second assembly to load after registering it with the smtpreg.vbs
utility.&amp;nbsp; I tried everything I could think of but nothing seemed to work.&amp;nbsp;
In order to even register I had to create the new version with a different class name
so the ProgID would be unique.&amp;nbsp; I also had to change the ComVisible attribute
Guid property so that I would have a new ClassID.&amp;nbsp; All of this was pretty obvious.&amp;nbsp;
But even after making sure things looked fine in the registry and the IIS metabase
(the actual SMTP sinks are all located in the metabase,) I couldn't get my event sink
to fire.&amp;nbsp; I was even registering using a unique name for the registration entry
by appending a 2 to the name (e.g. SMTP2MSMQ2 vs. SMTP2MSMQ.)
&lt;/p&gt;
&lt;p&gt;
I had just about given up when I thought I would try prefixing the version to the
registration name vs. appending it.&amp;nbsp; It worked!&amp;nbsp; I haven't spent any more
time (I had already spent way too much time on this) to figure out what the heck was
going on but left it up to some weird registration matchup logic due to the name beginning
with the same letters.&amp;nbsp; You can register the same SinkClass multiple times to
manage different patterns of email addresses, etc. but apparently the same name with
different SinkClasses is a no-no.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=e1f53d2c-a6f6-46f3-9f15-7fe4924c4729" /&gt;</description>
      <comments>http://blog.jasonfoster.com/CommentView,guid,e1f53d2c-a6f6-46f3-9f15-7fe4924c4729.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.jasonfoster.com/Trackback.aspx?guid=e441d3bd-9a07-4175-ad93-d5991b3d1323</trackback:ping>
      <pingback:server>http://blog.jasonfoster.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.jasonfoster.com/PermaLink,guid,e441d3bd-9a07-4175-ad93-d5991b3d1323.aspx</pingback:target>
      <dc:creator>Jason Foster!</dc:creator>
      <wfw:comment>http://blog.jasonfoster.com/CommentView,guid,e441d3bd-9a07-4175-ad93-d5991b3d1323.aspx</wfw:comment>
      <wfw:commentRss>http://blog.jasonfoster.com/SyndicationService.asmx/GetEntryCommentsRss?guid=e441d3bd-9a07-4175-ad93-d5991b3d1323</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
There is a very interesting <a title="Integrating Windows Workflow Foundation and Windows Communication Foundation" href="http://msdn2.microsoft.com/en-us/library/bb266709.aspx" target="_blank">article</a> out
from Microsoft all about hosting the Workflow runtime behind a Windows Communication
Foundation service layer.  There are some great points on using duplex channels
so events from the runtime can be sent back to the client.  The design is fundamentally
similar to what I've been working on for a few clients as described in this <a title="Hosting Windows Workflow Foundation in Windows Services" href="http://blog.jasonfoster.com/PermaLink,guid,6bd8993d-645d-4ef0-932f-f50bfbb11f3b.aspx">post</a>.
</p>
        <p>
It appears that this is an evolution of the Expense Reporting Sample that's been out
awhile.  The first version used .NET Remoting instead of WCF.  Guess they
didn't want to use someone else's alpha code to build their beta code :-)
</p>
        <p>
Check it out.
</p>
        <img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=e441d3bd-9a07-4175-ad93-d5991b3d1323" />
      </body>
      <title>Integrating Windows Workflow Foundation and Windows Communication Foundation</title>
      <guid isPermaLink="false">http://blog.jasonfoster.com/PermaLink,guid,e441d3bd-9a07-4175-ad93-d5991b3d1323.aspx</guid>
      <link>http://blog.jasonfoster.com/PermaLink,guid,e441d3bd-9a07-4175-ad93-d5991b3d1323.aspx</link>
      <pubDate>Wed, 28 Feb 2007 03:44:52 GMT</pubDate>
      <description>&lt;p&gt;
There is a very interesting &lt;a title="Integrating Windows Workflow Foundation and Windows Communication Foundation" href="http://msdn2.microsoft.com/en-us/library/bb266709.aspx" target="_blank"&gt;article&lt;/a&gt; out
from Microsoft all about hosting the Workflow runtime behind a Windows Communication
Foundation service layer.&amp;nbsp; There are some great points on using duplex channels
so events from the runtime can be sent back to the client.&amp;nbsp; The design is fundamentally
similar to what I've been working on for a few clients as described in this &lt;a title="Hosting Windows Workflow Foundation in Windows Services" href="http://blog.jasonfoster.com/PermaLink,guid,6bd8993d-645d-4ef0-932f-f50bfbb11f3b.aspx"&gt;post&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
It appears that this is an evolution of the Expense Reporting Sample that's been out
awhile.&amp;nbsp; The first version used .NET Remoting instead of WCF.&amp;nbsp; Guess they
didn't want to use someone else's alpha code to build their beta code :-)
&lt;/p&gt;
&lt;p&gt;
Check it out.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=e441d3bd-9a07-4175-ad93-d5991b3d1323" /&gt;</description>
      <comments>http://blog.jasonfoster.com/CommentView,guid,e441d3bd-9a07-4175-ad93-d5991b3d1323.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.jasonfoster.com/Trackback.aspx?guid=8bff44ec-516e-46c8-9ed9-ec0974657fd1</trackback:ping>
      <pingback:server>http://blog.jasonfoster.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.jasonfoster.com/PermaLink,guid,8bff44ec-516e-46c8-9ed9-ec0974657fd1.aspx</pingback:target>
      <dc:creator>Jason Foster!</dc:creator>
      <wfw:comment>http://blog.jasonfoster.com/CommentView,guid,8bff44ec-516e-46c8-9ed9-ec0974657fd1.aspx</wfw:comment>
      <wfw:commentRss>http://blog.jasonfoster.com/SyndicationService.asmx/GetEntryCommentsRss?guid=8bff44ec-516e-46c8-9ed9-ec0974657fd1</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ever had one of those moments when you wished you either knew everything there was
to know about software development or had decided to become a pea farmer in Brazil
(not that they even have pea farms in Brazil, but they might, but....) instead of
a software developer.  Well, I have and a show of hands in a crowded technical
gathering would prove my point.  This self-realization should give the reader
enough pause about reading on without me clearly stating that I'm sure someone else
has solved this problem in a much more elegant way - after all, I'm not even sure
they farm peas in Brazil.
</p>
        <p>
Anyway, just when I had decided that I should've given myself more time when I made
that fateful "farming vs. programming" decision, along comes an Intellisense moment
which made it all better.  I knew about the <em>Convert </em>class and had used
it numerous times so I did the fateful "conv+tab+." and started looking for gold. 
Sure enough I found it in the <em>ChangeType()</em> method.
</p>
        <h5>The problem...
</h5>
        <p>
A fellow developer had written a handy generic method for the type friendly retrieval
of application configuration settings.  Everything was working well until I tempted
Fate and asked for a value type, <em>int </em>in this case, back from the method:
</p>
        <p>
          <em>
            <font color="#ff0000">Error 1 The type 'int' must be a reference type in order
to use it as parameter 'T' in the generic type or method 'ConsoleApplication1.Program.GetSetting&lt;T&gt;(string)'</font>
          </em>
        </p>
        <p>
Well, that seemed like an important capability to have so diving into the wrapper
I went:
</p>
        <p>
        </p>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">
            <span style="color: blue">public</span>
            <span style="color: blue">static</span> T
GetSetting&lt;T&gt;(<span style="color: blue">string</span> key) <span style="color: blue">where</span> T
: <span style="color: blue">class</span></pre>
          <pre style="margin: 0px">{</pre>
          <pre style="margin: 0px">   <span style="color: blue">return</span><span style="color: teal">ConfigurationManager</span>.AppSettings[key] <span style="color: blue">as</span> T;</pre>
          <pre style="margin: 0px">}</pre>
        </div>
        <p>
        </p>
        <p>
To start with there was no way to call this method passing <em>int</em> as the
generic type because of the <em>class </em>constraint.  So, I quickly modified
it to the following:
</p>
        <p>
        </p>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">
            <span style="color: blue">public</span>
            <span style="color: blue">static</span> T
GetSetting&lt;T&gt;(<span style="color: blue">string</span> key)</pre>
          <pre style="margin: 0px">{</pre>
          <pre style="margin: 0px">   <span style="color: blue">return</span><span style="color: teal">ConfigurationManager</span>.AppSettings[key] <span style="color: blue">as</span> T;</pre>
          <pre style="margin: 0px">}</pre>
        </div>
        <p>
        </p>
        <p>
Which, of course, just means I'm a lazy programmer (which, of course, translates to
reduced crops of peas if I had chosen that profession.)  At first glance,
I thought removing the <em>class</em> constraint would be the answer.  Since
we don't have to think things out all the time in this age of change/compile/test/change/compile/test/scream/change/compile/test
development I let the compiler tell me if my guess was wrong (isn't that the whole
point of generics anyway?) kind of like a game of "Who Wants to Be a Millionaire?"
without the lifelines:
</p>
        <p>
        </p>
        <p>
          <em>
            <font color="#ff0000">Error 1 The type parameter 'T' cannot be used with the 'as'
operator because it does not have a class type constraint nor a 'class' constraint </font>
          </em>
        </p>
        <p>
This error message was so useful since I had just purposefully removed the <em>class</em> constraint. 
The super-fast-non-thinking-programmer in me changed it to:
</p>
        <p>
        </p>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">
            <span style="color: blue">public</span>
            <span style="color: blue">static</span> T
GetSetting&lt;T&gt;(<span style="color: blue">string</span> key)</pre>
          <pre style="margin: 0px">{</pre>
          <pre style="margin: 0px">   <span style="color: blue">return</span> (T)<span style="color: teal">ConfigurationManager</span>.AppSettings[key];</pre>
          <pre style="margin: 0px">}</pre>
        </div>
        <p>
        </p>
        <p>
The very brief moment of insight which caused me to change the cool and friendly <em>as</em> cast
to the traditional brute force cast proved NOT to be insightful at all as the trusty
compiler let me know: 
</p>
        <p>
          <em>
            <font color="#ff0000">Error 1 Cannot convert type 'string' to 'T'</font>
          </em>
        </p>
        <p>
And I thought you could cast pretty easily in the .NET Framework.  Well, you
can, but the compiler has no idea what T is going to be so it stops you from making
a bad cast and getting a runtime error which of course is <a href="http://www.codinghorror.com/blog/archives/000070.html" target="_blank">apparent
evil</a>.  Strong-typing vs. dynamic-typing aside, we were in a real pickle. 
We needed this generic method to deal well with a variety of types so... 
</p>
        <h5>The solution...(well, you read the title, right?)
</h5>
        <p>
        </p>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">
            <span style="color: blue">public</span>
            <span style="color: blue">static</span> T
GetSetting&lt;T&gt;(<span style="color: blue">string</span> key)</pre>
          <pre style="margin: 0px">{</pre>
          <pre style="margin: 0px">   <span style="color: blue">return</span> (T)<span style="color: teal">Convert</span>.ChangeType(<span style="color: teal">ConfigurationManager</span>.AppSettings[key], <span style="color: blue">typeof</span>(T));</pre>
          <pre style="margin: 0px">}</pre>
        </div>
        <p>
        </p>
        <p>
          <em>
            <a href="http://movies.ign.com/articles/745/745946p1.html" target="_new" atomicselection="true">
              <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 0px 0px 10px; border-right-width: 0px" height="75" alt="I am Invincible" src="http://blog.jasonfoster.com/content/binary/WindowsLiveWriter/Convert.ChangeTypetotherescue_F849/iaminvicible13.jpg" width="176" align="right" border="0" />
            </a>ChangeType()</em> has
several overloads but the one I was interested in took two parameters: 1) <em>object</em> value
and 2) <em>Type.  </em>This was exactly what was needed and I had another moment
of <a href="http://en.wikipedia.org/wiki/Xenia_Onatopp#Boris_Grishenko" target="_blank">"I
am invincible"</a> and was sure that I had chosen the right <a href="http://www.arrod.co.uk/essays/matrix.php" target="_blank">pill</a> (talk
about mixing movie metaphors.)
</p>
        <h5>The catch...
</h5>
        <p>
Everything compiled and my unit tests proved it to be working swimmingly so what was
that gnawing concern growing in the pit of my "been around the bend a few times" stomach. 
Things seemed happy and well adjusted.  That's about the time I always have hair
stand up on the back of my neck.  What's the catch?  Performance? 
Odd inconsistencies that will absolutely drive me nuts later?  Deprecation in
the next release of the framework?
</p>
        <p>
Armed with nothing but paranoia, I decided to research this little bad boy and see
just how awful it was.  Come to find out my worries weren't too justified as
I found out while Reflectoring the method in <em>mscorlib.dll.</em>  They actually
did what my cohort and I thought we were going to have to do in examining the incoming
T parameter's type and finding the right translation from the string results of the <em>ConfigurationManager.AppSettings[key].</em> 
So maybe I'm not as crazy as I thought since the framework folks did just what I had
planned.  
</p>
        <p>
However, one thing jumped out when I looked closely at the disassembly:
</p>
        <p>
        </p>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">
            <span style="color: teal">IConvertible</span> convertible1
= value <span style="color: blue">as</span><span style="color: teal">IConvertible</span>;</pre>
          <pre style="margin: 0px">
            <span style="color: blue">if</span> (convertible1 == <span style="color: blue">null</span>)</pre>
          <pre style="margin: 0px">{</pre>
          <pre style="margin: 0px">   <span style="color: blue">if</span> (value.GetType()
!= conversionType)</pre>
          <pre style="margin: 0px">   {</pre>
          <pre style="margin: 0px">      <span style="color: blue">throw</span><span style="color: blue">new</span><span style="color: teal">InvalidCastException</span>(<span style="color: teal">Environment</span>.GetResourceString(<span style="color: maroon">"InvalidCast_IConvertible"</span>));</pre>
          <pre style="margin: 0px">   }</pre>
          <pre style="margin: 0px">   <span style="color: blue">return</span> value;</pre>
          <pre style="margin: 0px">}</pre>
        </div>
        <p>
        </p>
        <p>
As I pondered the deeper meaning of what I had just found I realized that it might
be a bad thing if I passed in a type parameter for T which was not of the <em>IConvertible </em>ilk. 
Which led me to the final version below:
</p>
        <p>
        </p>
        <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
          <pre style="margin: 0px">
            <span style="color: blue">public</span>
            <span style="color: blue">static</span> T
GetSetting&lt;T&gt;(<span style="color: blue">string</span> key) <span style="color: blue">where</span> T
: <span style="color: teal">IConvertible</span></pre>
          <pre style="margin: 0px">{</pre>
          <pre style="margin: 0px">   <span style="color: blue">return</span> (T)<span style="color: teal">Convert</span>.ChangeType(<span style="color: teal">ConfigurationManager</span>.AppSettings[key], <span style="color: blue">typeof</span>(T));</pre>
          <pre style="margin: 0px">}</pre>
        </div>
        <p>
With the <em>IConvertible</em> constraint on the T parameter I could rest easy that
this method should provide years of use without any harmful side effects and that
I could lay to rest the ongoing controversy in my mind of peas or C# (yeah, right.)
</p>
        <img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=8bff44ec-516e-46c8-9ed9-ec0974657fd1" />
      </body>
      <title>Convert.ChangeType() to the rescue of a generic method (and my sanity)...</title>
      <guid isPermaLink="false">http://blog.jasonfoster.com/PermaLink,guid,8bff44ec-516e-46c8-9ed9-ec0974657fd1.aspx</guid>
      <link>http://blog.jasonfoster.com/PermaLink,guid,8bff44ec-516e-46c8-9ed9-ec0974657fd1.aspx</link>
      <pubDate>Wed, 06 Dec 2006 02:31:37 GMT</pubDate>
      <description>&lt;p&gt;
Ever had one of those moments when you wished you either knew everything there was
to know about software development or had decided to become a pea farmer in Brazil
(not that they even have pea farms in Brazil, but they might, but....) instead of
a software developer.&amp;nbsp; Well, I have and a show of hands in a crowded technical
gathering would prove my point.&amp;nbsp; This self-realization should give the reader
enough pause about reading on without me clearly stating that I'm sure someone else
has solved this problem in a much more elegant way - after all, I'm not even sure
they farm peas in Brazil.
&lt;/p&gt;
&lt;p&gt;
Anyway, just when I had decided that I should've given myself more time when I made
that fateful "farming vs. programming" decision, along comes an Intellisense moment
which made it all better.&amp;nbsp; I knew about the &lt;em&gt;Convert &lt;/em&gt;class and had used
it numerous times so I did the fateful "conv+tab+." and started looking for gold.&amp;nbsp;
Sure enough I found it in the &lt;em&gt;ChangeType()&lt;/em&gt; method.
&lt;/p&gt;
&lt;h5&gt;The problem...
&lt;/h5&gt;
&lt;p&gt;
A fellow developer had written a handy generic method for the type friendly retrieval
of application configuration settings.&amp;nbsp; Everything was working well until I tempted
Fate and asked for a value type, &lt;em&gt;int &lt;/em&gt;in this case, back from the method:
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;font color="#ff0000"&gt;Error 1 The type 'int' must be a reference type in order
to use it as parameter 'T' in the generic type or method 'ConsoleApplication1.Program.GetSetting&amp;lt;T&amp;gt;(string)'&lt;/font&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
Well, that seemed like an important capability to have so diving into the wrapper
I went:
&lt;/p&gt;
&lt;p&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;static&lt;/span&gt; T
GetSetting&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt; key) &lt;span style="color: blue"&gt;where&lt;/span&gt; T
: &lt;span style="color: blue"&gt;class&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;{&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: teal"&gt;ConfigurationManager&lt;/span&gt;.AppSettings[key] &lt;span style="color: blue"&gt;as&lt;/span&gt; T;&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
To start with there was no way to call this method passing&amp;nbsp;&lt;em&gt;int&lt;/em&gt; as the
generic type because of the &lt;em&gt;class &lt;/em&gt;constraint.&amp;nbsp; So, I quickly modified
it to the following:
&lt;/p&gt;
&lt;p&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;static&lt;/span&gt; T
GetSetting&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt; key)&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;{&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: teal"&gt;ConfigurationManager&lt;/span&gt;.AppSettings[key] &lt;span style="color: blue"&gt;as&lt;/span&gt; T;&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Which, of course, just means I'm a lazy programmer (which, of course, translates to
reduced crops of peas if&amp;nbsp;I had chosen that profession.)&amp;nbsp; At first glance,
I thought removing&amp;nbsp;the &lt;em&gt;class&lt;/em&gt; constraint would be the answer.&amp;nbsp; Since
we don't have to think things out all the time in this age of change/compile/test/change/compile/test/scream/change/compile/test
development I let the compiler tell me if my guess was wrong (isn't that the whole
point of generics anyway?) kind of like a game of "Who Wants to Be a Millionaire?"
without the lifelines:
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;font color="#ff0000"&gt;Error 1 The type parameter 'T' cannot be used with the 'as'
operator because it does not have a class type constraint nor a 'class' constraint &lt;/font&gt;&lt;/em&gt; 
&lt;p&gt;
This error message was so useful since I had just purposefully removed the &lt;em&gt;class&lt;/em&gt; constraint.&amp;nbsp;
The super-fast-non-thinking-programmer in me changed it to:
&lt;/p&gt;
&lt;p&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;static&lt;/span&gt; T
GetSetting&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt; key)&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;{&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;return&lt;/span&gt; (T)&lt;span style="color: teal"&gt;ConfigurationManager&lt;/span&gt;.AppSettings[key];&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
The very brief moment of insight which caused me to change the cool and friendly&amp;nbsp;&lt;em&gt;as&lt;/em&gt; cast
to the traditional brute force cast proved&amp;nbsp;NOT to be insightful at all as&amp;nbsp;the&amp;nbsp;trusty
compiler let me know:&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;font color="#ff0000"&gt;Error 1 Cannot convert type 'string' to 'T'&lt;/font&gt;&lt;/em&gt; 
&lt;p&gt;
And I thought you could cast pretty easily in the .NET Framework.&amp;nbsp; Well, you
can, but the compiler has no idea what T is going to be so it stops you from making
a bad cast and getting a runtime error which of course is &lt;a href="http://www.codinghorror.com/blog/archives/000070.html" target="_blank"&gt;apparent
evil&lt;/a&gt;.&amp;nbsp; Strong-typing vs. dynamic-typing aside, we were in&amp;nbsp;a real pickle.&amp;nbsp;
We needed this generic method to deal well with a variety of types so... 
&lt;h5&gt;The solution...(well, you read the title, right?)
&lt;/h5&gt;
&lt;p&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;static&lt;/span&gt; T
GetSetting&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt; key)&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;{&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;return&lt;/span&gt; (T)&lt;span style="color: teal"&gt;Convert&lt;/span&gt;.ChangeType(&lt;span style="color: teal"&gt;ConfigurationManager&lt;/span&gt;.AppSettings[key], &lt;span style="color: blue"&gt;typeof&lt;/span&gt;(T));&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;a href="http://movies.ign.com/articles/745/745946p1.html" target="_new" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 0px 0px 10px; border-right-width: 0px" height="75" alt="I am Invincible" src="http://blog.jasonfoster.com/content/binary/WindowsLiveWriter/Convert.ChangeTypetotherescue_F849/iaminvicible13.jpg" width="176" align="right" border="0"&gt;&lt;/a&gt;ChangeType()&lt;/em&gt; has
several overloads but the one I was interested in took two parameters: 1) &lt;em&gt;object&lt;/em&gt; value
and 2) &lt;em&gt;Type.&amp;nbsp; &lt;/em&gt;This was exactly what was needed and I had another moment
of &lt;a href="http://en.wikipedia.org/wiki/Xenia_Onatopp#Boris_Grishenko" target="_blank"&gt;"I
am invincible"&lt;/a&gt; and&amp;nbsp;was sure that&amp;nbsp;I had chosen the right&amp;nbsp;&lt;a href="http://www.arrod.co.uk/essays/matrix.php" target="_blank"&gt;pill&lt;/a&gt; (talk
about mixing movie metaphors.)
&lt;/p&gt;
&lt;h5&gt;The catch...
&lt;/h5&gt;
&lt;p&gt;
Everything compiled and my unit tests proved it to be working swimmingly so what was
that gnawing concern growing in the pit of my "been around the bend a few times" stomach.&amp;nbsp;
Things seemed happy and well adjusted.&amp;nbsp; That's about the time I always have hair
stand up on the back of my neck.&amp;nbsp; What's the catch?&amp;nbsp; Performance?&amp;nbsp;
Odd inconsistencies that will absolutely drive me nuts later?&amp;nbsp; Deprecation in
the next release of the framework?
&lt;/p&gt;
&lt;p&gt;
Armed with nothing but paranoia, I decided to research this little bad boy and see
just how awful it was.&amp;nbsp; Come to find out my worries weren't too justified as
I found out while Reflectoring the method in &lt;em&gt;mscorlib.dll.&lt;/em&gt;&amp;nbsp; They actually
did what my cohort and I thought we were going to have to do in examining the incoming
T parameter's type and finding the right translation from the string results of the &lt;em&gt;ConfigurationManager.AppSettings[key].&lt;/em&gt;&amp;nbsp;
So maybe I'm not as crazy as I thought since the framework folks did just what I had
planned.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
However, one thing jumped out when&amp;nbsp;I looked closely at the disassembly:
&lt;/p&gt;
&lt;p&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&lt;span style="color: teal"&gt;IConvertible&lt;/span&gt; convertible1
= value &lt;span style="color: blue"&gt;as&lt;/span&gt; &lt;span style="color: teal"&gt;IConvertible&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;&lt;span style="color: blue"&gt;if&lt;/span&gt; (convertible1 == &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;{&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;if&lt;/span&gt; (value.GetType()
!= conversionType)&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;throw&lt;/span&gt; &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: teal"&gt;InvalidCastException&lt;/span&gt;(&lt;span style="color: teal"&gt;Environment&lt;/span&gt;.GetResourceString(&lt;span style="color: maroon"&gt;"InvalidCast_IConvertible"&lt;/span&gt;));&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;return&lt;/span&gt; value;&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
As I pondered the deeper meaning of what I had just found I realized that it might
be a bad thing if I passed in a type parameter for T which was not of the &lt;em&gt;IConvertible &lt;/em&gt;ilk.&amp;nbsp;
Which led me to the final version below:
&lt;/p&gt;
&lt;p&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;&lt;pre style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;static&lt;/span&gt; T
GetSetting&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt; key) &lt;span style="color: blue"&gt;where&lt;/span&gt; T
: &lt;span style="color: teal"&gt;IConvertible&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;{&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;return&lt;/span&gt; (T)&lt;span style="color: teal"&gt;Convert&lt;/span&gt;.ChangeType(&lt;span style="color: teal"&gt;ConfigurationManager&lt;/span&gt;.AppSettings[key], &lt;span style="color: blue"&gt;typeof&lt;/span&gt;(T));&lt;/pre&gt;
&lt;pre style="margin: 0px"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
With the &lt;em&gt;IConvertible&lt;/em&gt; constraint on the T parameter I could rest easy that
this method should provide years of use without any harmful side effects and that
I could lay to rest the ongoing controversy in my mind of peas or C# (yeah, right.)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=8bff44ec-516e-46c8-9ed9-ec0974657fd1" /&gt;</description>
      <comments>http://blog.jasonfoster.com/CommentView,guid,8bff44ec-516e-46c8-9ed9-ec0974657fd1.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.jasonfoster.com/Trackback.aspx?guid=6bd8993d-645d-4ef0-932f-f50bfbb11f3b</trackback:ping>
      <pingback:server>http://blog.jasonfoster.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.jasonfoster.com/PermaLink,guid,6bd8993d-645d-4ef0-932f-f50bfbb11f3b.aspx</pingback:target>
      <dc:creator>Jason Foster!</dc:creator>
      <wfw:comment>http://blog.jasonfoster.com/CommentView,guid,6bd8993d-645d-4ef0-932f-f50bfbb11f3b.aspx</wfw:comment>
      <wfw:commentRss>http://blog.jasonfoster.com/SyndicationService.asmx/GetEntryCommentsRss?guid=6bd8993d-645d-4ef0-932f-f50bfbb11f3b</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've been spending some time working with hosting the WF runtime in a WCF-wrapped
Windows service.  The idea is to allow these services to be run on servers behind
a load balancing technology like NLBS.  In my research I ran across a few great
articles and samples which might be useful so I thought I'd post them here.
</p>
        <p>
My goal for these hosting services is to make them as loosely-coupled as possible. 
Ultimately, I'd like to have the full set of runtime and service events available
through a publish/subscribe architecture similar to <a title="IDesign Downloads for WCF" href="http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=5&amp;tabid=11#Operations" target="_blank">Juval
Lowy's</a> so that the disconnected and potentially remote consumers could be notified
of status and process changes in their respective workflows.  Also, to accomplish
the loose coupling, I am taking bits and pieces from the <a title="Workflow Adapter/Connector Pair by Roman Kiss" href="http://www.codeproject.com/useritems/CustomRemotingForWorkflow.asp" target="_blank">Workflow
Adapter/Connector</a> and <a title="WS-Transfer Service for Workflow by Roman Kiss" href="http://www.codeproject.com/useritems/WSTransferWorkflow.asp" target="_blank">WS-Transfer
Service for Workflow</a> articles that Roman Kiss posted on CodeProject.com. 
There's a lot of work to do but I think in the end the architecture is a sound one. 
I'm not sure I'll go all the way to WS-Transfer yet but it's definitely a compelling
protocol.
</p>
        <p>
There's a good <a href="http://wf.netfx3.com/files/folders/technology/entry5072.aspx" target="_blank" rel="Hosting Workflows in a Windows Service">example</a> of
hosting workflows in a Windows service out on the Workflow community <a title="Windows Workflow Foundation Community Site" href="http://wf.netfx3.com" target="_blank">site</a>. 
It also demonstrates the use of <em>IExtension</em> in WCF for hosting the Workflow
runtime.
</p>
        <img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=6bd8993d-645d-4ef0-932f-f50bfbb11f3b" />
      </body>
      <title>Hosting Windows Workflow Foundation in Windows Services</title>
      <guid isPermaLink="false">http://blog.jasonfoster.com/PermaLink,guid,6bd8993d-645d-4ef0-932f-f50bfbb11f3b.aspx</guid>
      <link>http://blog.jasonfoster.com/PermaLink,guid,6bd8993d-645d-4ef0-932f-f50bfbb11f3b.aspx</link>
      <pubDate>Fri, 01 Dec 2006 05:02:21 GMT</pubDate>
      <description>&lt;p&gt;
I've been spending some time working with hosting the WF runtime in a WCF-wrapped
Windows service.&amp;nbsp; The idea is to allow these services to be run on servers behind
a load balancing technology like NLBS.&amp;nbsp; In my research I ran across a few great
articles and samples which might be useful so I thought I'd post them here.
&lt;/p&gt;
&lt;p&gt;
My goal for these hosting services is to make them as loosely-coupled as possible.&amp;nbsp;
Ultimately, I'd like to have the full set of runtime and service events available
through a publish/subscribe architecture similar to &lt;a title="IDesign Downloads for WCF" href="http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=5&amp;amp;tabid=11#Operations" target="_blank"&gt;Juval
Lowy's&lt;/a&gt; so that the disconnected and potentially remote consumers could be notified
of status and process changes in their respective workflows.&amp;nbsp; Also, to accomplish
the loose coupling, I am taking bits and pieces from the &lt;a title="Workflow Adapter/Connector Pair by Roman Kiss" href="http://www.codeproject.com/useritems/CustomRemotingForWorkflow.asp" target="_blank"&gt;Workflow
Adapter/Connector&lt;/a&gt; and &lt;a title="WS-Transfer Service for Workflow by Roman Kiss" href="http://www.codeproject.com/useritems/WSTransferWorkflow.asp" target="_blank"&gt;WS-Transfer
Service for Workflow&lt;/a&gt; articles that Roman Kiss posted on CodeProject.com.&amp;nbsp;
There's a lot of work to do but I think in the end the architecture is a sound one.&amp;nbsp;
I'm not sure I'll go all the way to WS-Transfer yet but it's definitely a compelling
protocol.
&lt;/p&gt;
&lt;p&gt;
There's a good &lt;a href="http://wf.netfx3.com/files/folders/technology/entry5072.aspx" target="_blank" rel="Hosting Workflows in a Windows Service"&gt;example&lt;/a&gt; of
hosting workflows in a Windows service out on the Workflow community &lt;a title="Windows Workflow Foundation Community Site" href="http://wf.netfx3.com" target="_blank"&gt;site&lt;/a&gt;.&amp;nbsp;
It also demonstrates the use of &lt;em&gt;IExtension&lt;/em&gt; in&amp;nbsp;WCF for hosting the Workflow
runtime.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=6bd8993d-645d-4ef0-932f-f50bfbb11f3b" /&gt;</description>
      <comments>http://blog.jasonfoster.com/CommentView,guid,6bd8993d-645d-4ef0-932f-f50bfbb11f3b.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.jasonfoster.com/Trackback.aspx?guid=15cf72c6-64cf-4db0-83cf-1e3a51f718e8</trackback:ping>
      <pingback:server>http://blog.jasonfoster.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.jasonfoster.com/PermaLink,guid,15cf72c6-64cf-4db0-83cf-1e3a51f718e8.aspx</pingback:target>
      <dc:creator>Jason Foster!</dc:creator>
      <wfw:comment>http://blog.jasonfoster.com/CommentView,guid,15cf72c6-64cf-4db0-83cf-1e3a51f718e8.aspx</wfw:comment>
      <wfw:commentRss>http://blog.jasonfoster.com/SyndicationService.asmx/GetEntryCommentsRss?guid=15cf72c6-64cf-4db0-83cf-1e3a51f718e8</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just wanted a common place I could reference this presentation and code samples. 
It was a fun side project that <a title="Matt Brown's Blog" href="http://blog.weminuche.net/" target="_blank">Matt
Brown</a> and I have enjoyed presenting to the <a title="SouthColorado.NET User Group" href="http://www.southcolorado.net/" target="_blank">local
user group</a> and a couple of <a title="Front Range Code Camp" href="http://www.frontrangecodecamp.com/" target="_blank">code</a><a title="SoCol Code Camp" href="http://codecamp.southcolorado.net/" target="_blank">camps</a> here
in Colorado.  It was originally done pre-Beta 2 so there are definitely things
we would do differently now but it does show some cool WCF and WF concepts. 
And, it might help in your next job search.
</p>
        <p>
          <a title="The Server Side of the .NET Framework 3.0 Presentation Materials" href="http://blog.jasonfoster.com/public/presentations/theserverside.zip">Enjoy</a>.
</p>
        <img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=15cf72c6-64cf-4db0-83cf-1e3a51f718e8" />
      </body>
      <title>The Server Side of the .NET Framework 3.0 Presentation Materials</title>
      <guid isPermaLink="false">http://blog.jasonfoster.com/PermaLink,guid,15cf72c6-64cf-4db0-83cf-1e3a51f718e8.aspx</guid>
      <link>http://blog.jasonfoster.com/PermaLink,guid,15cf72c6-64cf-4db0-83cf-1e3a51f718e8.aspx</link>
      <pubDate>Wed, 29 Nov 2006 23:22:50 GMT</pubDate>
      <description>&lt;p&gt;
Just wanted a common place I could reference this presentation and code samples.&amp;nbsp;
It was a fun side project that &lt;a title="Matt Brown's Blog" href="http://blog.weminuche.net/" target="_blank"&gt;Matt
Brown&lt;/a&gt;&amp;nbsp;and I have enjoyed presenting to&amp;nbsp;the &lt;a title="SouthColorado.NET User Group" href="http://www.southcolorado.net/" target="_blank"&gt;local
user group&lt;/a&gt; and a couple of &lt;a title="Front Range Code Camp" href="http://www.frontrangecodecamp.com/" target="_blank"&gt;code&lt;/a&gt; &lt;a title="SoCol Code Camp" href="http://codecamp.southcolorado.net/" target="_blank"&gt;camps&lt;/a&gt; here
in Colorado.&amp;nbsp; It was originally done pre-Beta 2 so there are definitely things
we would do differently now but it does show some cool WCF and WF concepts.&amp;nbsp;
And, it might help in your next job search.
&lt;/p&gt;
&lt;p&gt;
&lt;a title="The Server Side of the .NET Framework 3.0 Presentation Materials" href="http://blog.jasonfoster.com/public/presentations/theserverside.zip"&gt;Enjoy&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.jasonfoster.com/aggbug.ashx?id=15cf72c6-64cf-4db0-83cf-1e3a51f718e8" /&gt;</description>
      <comments>http://blog.jasonfoster.com/CommentView,guid,15cf72c6-64cf-4db0-83cf-1e3a51f718e8.aspx</comments>
    </item>
  </channel>
</rss>