<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" 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/" version="2.0">
  <channel>
    <title>The Efficient Coder</title>
    <link>http://www.efficientcoder.net/</link>
    <description>There has got to be a better way of communicating with our computers!</description>
    <language>en-us</language>
    <copyright>Kevin D. Wolf</copyright>
    <lastBuildDate>Wed, 01 Apr 2009 18:20:44 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.8.5223.2</generator>
    <managingEditor>kevinw@software-logistics.com</managingEditor>
    <webMaster>kevinw@software-logistics.com</webMaster>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=40f9a930-bf75-4581-a997-b7c6c8b4896a</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,40f9a930-bf75-4581-a997-b7c6c8b4896a.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,40f9a930-bf75-4581-a997-b7c6c8b4896a.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=40f9a930-bf75-4581-a997-b7c6c8b4896a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p class="post-title entry-title">
          <font size="4" face="Times New Roman">We are pleased to announce the release of V4.1.2009
      of the Cloud-2-Relational Query Engine.</font>
        </p>
        <div class="post-body entry-content">
          <h3>What is it?
      </h3>
          <p>
            <font size="4" face="Times New Roman">Our Query Engine will allow you to write SQL
         that will be executed against both a cloud table storage provider as well as most
         relational database engines.</font>
          </p>
          <p>
            <font size="4" face="Times New Roman">We all know the benefit of an RDBMS is the ability
         to write sophisticated DML to extract data.  Although these scale fairly well,
         to store hundreds of millions of records requires special attention or your performance
         will suffer.  Most cloud storage solutions have the ability to store zillions
         of records (well at least in theory) but don’t really support joins, this is a real
         problem if you want to normalize your database.</font>
          </p>
          <p>
            <font size="4" face="Times New Roman">This is where our product comes in.  The
         best of both worlds, the ability of a cloud table provider to store zillions of orders
         and the ability to join those orders with a much smaller lookup table such as OrderStatus</font>
          </p>
          <p>
            <font size="4" face="Times New Roman">You simply write a query such as:</font>
          </p>
          <blockquote>
            <p>
              <font face="Courier New">select rdbms.Status, cloud.OrderNumber, cloud.OrderAmount 
         <br />
           from status rdbms, 
         <br />
            join (Select  OrderNumber, OrderAmount  
         <br />
                    from  myCloud.orders  
         <br />
                    </font>
              <font face="Courier New">where
         UserId = @userId) as cloud on cloud.OrderStatusId = rdbms.OrderStatusId</font>
            </p>
            <p>
              <font face="Courier New">
              </font>
            </p>
          </blockquote>
          <p>
            <font size="4" face="Times New Roman">We are still working on enforcing referential
         integrity however once we do that we will have the best of both worlds.  Performance
         and Scalability of large scale cloud storage and flexibility of a RDBMS.</font>
          </p>
          <p>
            <font size="4" face="Times New Roman">-ec</font>
          </p>
        </div>
        <img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=40f9a930-bf75-4581-a997-b7c6c8b4896a" />
      </body>
      <title>Announcing V4.1.2009 of Cloud-2-Relational Query Engine </title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,40f9a930-bf75-4581-a997-b7c6c8b4896a.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,40f9a930-bf75-4581-a997-b7c6c8b4896a.aspx</link>
      <pubDate>Wed, 01 Apr 2009 18:20:44 GMT</pubDate>
      <description>&lt;p class="post-title entry-title"&gt;
   &lt;font size=4 face="Times New Roman"&gt;We are pleased to announce the release of V4.1.2009
   of the Cloud-2-Relational Query Engine.&lt;/font&gt;
&lt;/p&gt;
&lt;div class="post-body entry-content"&gt;
   &lt;h3&gt;What is it?
   &lt;/h3&gt;
   &lt;p&gt;
      &lt;font size=4 face="Times New Roman"&gt;Our Query Engine will allow you to write SQL that
      will be executed against both a cloud table storage provider as well as most relational
      database engines.&lt;/font&gt;
   &lt;/p&gt;
   &lt;p&gt;
      &lt;font size=4 face="Times New Roman"&gt;We all know the benefit of an RDBMS is the ability
      to write sophisticated DML to extract data.&amp;nbsp; Although these scale fairly well,
      to store hundreds of millions of records requires special attention or your performance
      will suffer.&amp;nbsp; Most cloud storage solutions have the ability to store zillions
      of records (well at least in theory) but don’t really support joins, this is a real
      problem if you want to normalize your database.&lt;/font&gt;
   &lt;/p&gt;
   &lt;p&gt;
      &lt;font size=4 face="Times New Roman"&gt;This is where our product comes in.&amp;nbsp; The
      best of both worlds, the ability of a cloud table provider to store zillions of orders
      and the ability to join those orders with a much smaller lookup table such as OrderStatus&lt;/font&gt;
   &lt;/p&gt;
   &lt;p&gt;
      &lt;font size=4 face="Times New Roman"&gt;You simply write a query such as:&lt;/font&gt;
   &lt;/p&gt;
   &lt;blockquote&gt; 
   &lt;p&gt;
      &lt;font face="Courier New"&gt;select rdbms.Status, cloud.OrderNumber, cloud.OrderAmount 
      &lt;br&gt;
      &amp;nbsp; from status rdbms, 
      &lt;br&gt;
      &amp;nbsp;&amp;nbsp; join (Select&amp;nbsp; OrderNumber, OrderAmount&amp;nbsp; 
      &lt;br&gt;
      &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from&amp;nbsp; myCloud.orders&amp;nbsp; 
      &lt;br&gt;
      &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font face="Courier New"&gt;where
      UserId = @userId) as cloud on cloud.OrderStatusId = rdbms.OrderStatusId&lt;/font&gt;
   &lt;/p&gt;
   &lt;p&gt;
      &lt;font face="Courier New"&gt;&lt;/font&gt;
   &lt;/p&gt;
   &lt;/blockquote&gt; 
   &lt;p&gt;
      &lt;font size=4 face="Times New Roman"&gt;We are still working on enforcing referential
      integrity however once we do that we will have the best of both worlds.&amp;nbsp; Performance
      and Scalability of large scale cloud storage and flexibility of a RDBMS.&lt;/font&gt;
   &lt;/p&gt;
   &lt;p&gt;
      &lt;font size=4 face="Times New Roman"&gt;-ec&lt;/font&gt;
   &lt;/p&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=40f9a930-bf75-4581-a997-b7c6c8b4896a" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,40f9a930-bf75-4581-a997-b7c6c8b4896a.aspx</comments>
      <category>ASP.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=559c2673-0a20-4525-b013-42173554b876</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,559c2673-0a20-4525-b013-42173554b876.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,559c2673-0a20-4525-b013-42173554b876.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=559c2673-0a20-4525-b013-42173554b876</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="3">In my ChaosFilter project, I'm factoring all the text and strings into
      a resource class.  The intent is to allow for customization by the end user for
      different installations and possibly translation at some point.  My solution
      is to place all my text into a class with properties that figure out how to get the
      text based based upon a unique key and context (which company/application they are
      running in).  Currently these are stored in the database and then loaded into
      a cached dictionary object.  This appears to work very fast, however with my
      architecture and a bit of code gen this could easily be replaced by more traditional
      resources.  </font>
        </p>
        <p>
          <font size="3">In the past it's been a pain the a** since I needed to create the label,
      put the marker into my class file then insert the field into the database.  A
      better solution certainly exists.  My solution is to build a DXCore custom refactoring. 
      The idea would be if I'm in a C# class within a string literal or an ASP.NET
      page within some static HTML, I could hit the refacting key and and take that text
      and convert it into a message or a simple label.  The difference being a
      label is only a few words where the message could be sentance or two.  For larger
      blocks of text I have a different approach.</font>
        </p>
        <h4>My Solution
   </h4>
        <p>
          <font size="3">For a ASP.NET page:<br /></font>
          <img src="http://www.efficientcoder.com/content/binary/ASPNETRefactoring.gif" border="0" />
        </p>
        <p>
          <font size="3">For a C# code file (in a library assembly or code behind):</font>
          <br />
          <img src="http://www.efficientcoder.com/content/binary/CSRefactorings.gif" border="0" />
        </p>
        <p>
          <font size="3">Then to enter the text:</font>
          <br />
          <img src="http://www.efficientcoder.com/content/binary/FieldEditor.gif" border="0" />
        </p>
        <p>
       
   </p>
        <p>
          <font size="3">So how was this done?  Actually it was fairly trivial, I built
      part of it early this week in a couple hours, the rest this morning.  Probably
      &lt; 4 hours for the whole thing and I haven't built a plugin for a couple years.</font>
        </p>
        <p>
          <font size="3">
          </font> 
   </p>
        <h4>Getting Started
   </h4>
        <p>
          <font size="3">This link does a much better job than I could to show the basics of
      creating a DXCore plugin, but unless I missed it, it didn't cover too much about creating
      custom refactorings.</font>
        </p>
        <p>
          <a href="http://community.devexpress.com/forums/t/68994.aspx">http://community.devexpress.com/forums/t/68994.aspx</a>
        </p>
        <p>
          <font size="3">
          </font> 
   </p>
        <p>
          <font size="3">So assuming that you have the frameworks setup for your plugin (I'm
      going to skip a few steps not relevant and found elsewhere), here's what you need
      to do:</font>
        </p>
        <p>
          <font size="3">1) Create a new DXCore Plug for your refactoring:</font>
        </p>
        <p>
          <font size="3">
            <img src="http://www.efficientcoder.com/content/binary/CreatePlugin.gif" border="0" />
          </font>
        </p>
        <p>
          <font size="3">
          </font> 
   </p>
        <p>
          <font size="3">2) By default the Refactoring Provider that you need to create a custom
      Refactoring is not in the toolbox, it can be added by "Choose Items" and selecting
      the RefactoringProvider</font>
          <br />
          <img src="http://www.efficientcoder.com/content/binary/RefactoringProvider.gif" border="0" />
        </p>
        <p>
          <font size="3">3) Once you add that, drop that onto your custom design surface for
      your Refactoring plugin, it should look something boring like:</font>
        </p>
        <p>
          <img src="http://www.efficientcoder.com/content/binary/RefactorDesigner.gif" border="0" />
        </p>
        <p>
          <font size="3">4) The click on Properties for your component and add appropriate values:</font>
        </p>
        <p>
          <img src="http://www.efficientcoder.com/content/binary/RefactorProperties.gif" border="0" />
        </p>
        <p>
          <font size="3">5) Now go in and click on the highlighed events to build up your stubs:</font>
        </p>
        <p>
          <img src="http://www.efficientcoder.com/content/binary/RefactorEvents.gif" border="0" />
        </p>
        <p>
          <font size="3">6) Finally go in and add your code (painting code from: <a href="http://tinyurl.com/5a3pe2">http://tinyurl.com/5a3pe2</a>):</font>
        </p>
        <font size="1">
          <p>
          </p>
        </font>
        <font face="Courier New">
          <font size="3">
            <font color="#0000ff">
              <font color="#0000ff">private</font>
            </font>
            <font color="#0000ff">
              <font color="#0000ff">bool</font>
            </font> _handlingEditorForegroundPaint
   = <font color="#0000ff"><font color="#0000ff">false</font></font></font>
        </font>
        <font face="Courier New">
          <font size="3">;<br /><font color="#0000ff"><font color="#0000ff">private</font></font><font color="#2b91af"><font color="#2b91af">SourceRange</font></font></font>
        </font>
        <font face="Courier New">
          <font size="3"> _previewRange;<br /><font color="#0000ff"><font color="#0000ff">private</font></font> DevExpress.CodeRush.UserControls.<font color="#2b91af"><font color="#2b91af">CodePreviewWindow</font></font> _previewWindow
   = <font color="#0000ff"><font color="#0000ff">null</font></font></font>
        </font>
        <font face="Courier New" size="3">;<br /></font>
        <p>
          <font color="#008000">
            <font color="#008000">
              <font face="Courier New" size="3">// DXCore-generated
      code...</font>
            </font>
          </font>
        </p>
        <font color="#0000ff">
          <font color="#0000ff">
            <p>
              <font face="Courier New" size="3">#region</font>
            </p>
          </font>
        </font>
        <font face="Courier New">
          <font size="3">
            <font color="#000000"> InitializePlugIn<br /></font>
            <font color="#0000ff">
              <font color="#0000ff">#region</font>
            </font>
            <font color="#000000"> FinalizePlugIn</font>
          </font>
        </font>
        <p>
          <font face="Courier New">
            <font size="3">
              <font color="#0000ff">
                <font color="#0000ff">private</font>
              </font>
              <font color="#0000ff">
                <font color="#0000ff">void</font>
              </font> ConvertToCustomCaption_Apply(<font color="#0000ff"><font color="#0000ff">object</font></font> sender, <font color="#2b91af"><font color="#2b91af">ApplyContentEventArgs</font></font></font>
          </font>
          <font face="Courier New">
            <font size="3"> ea)<br />
      {<br />
         <font color="#0000ff"><font color="#0000ff">var</font></font> customLabel
      = <font color="#0000ff"><font color="#0000ff">new</font></font> ui.<font color="#2b91af"><font color="#2b91af">CustomCaption</font></font></font>
          </font>
          <font face="Courier New">
            <font size="3">();<br />
         ea.Element.SelectFullBlock();<br />
         customLabel.ShowWithString(<font color="#2b91af"><font color="#2b91af">CodeRush</font></font>.Selection.Text, <font color="#2b91af"><font color="#2b91af">CodeRush</font></font></font>
          </font>
          <font face="Courier New">
            <font size="3">.Caret.ScreenPosition);<br />
         <font color="#0000ff"><font color="#0000ff">if</font></font></font>
          </font>
          <font face="Courier New">
            <font size="3"> (!customLabel.Cancelled)<br />
            ea.Selection.Text = <font color="#0000ff"><font color="#0000ff">string</font></font>.Format(<font color="#a31515"><font color="#a31515">"Customization.Captions.{0}"</font></font></font>
          </font>
          <font face="Courier New" size="3">,
      customLabel.LabelKey);<br />
      }</font>
        </p>
        <p>
          <font face="Courier New">
            <font size="3">
              <font color="#0000ff">
                <font color="#0000ff">private</font>
              </font>
              <font color="#0000ff">
                <font color="#0000ff">void</font>
              </font> ConvertToCustomCaption_CheckAvailability(<font color="#0000ff"><font color="#0000ff">object</font></font> sender, <font color="#2b91af"><font color="#2b91af">CheckContentAvailabilityEventArgs</font></font></font>
          </font>
          <font face="Courier New" size="3"> ea)<br /></font>
          <font face="Courier New">
            <font size="3">{<br />
         ea.Available = <font color="#2b91af"><font color="#2b91af">CodeRush</font></font></font>
          </font>
          <font face="Courier New" size="3">.Caret.InsideString
      &amp;&amp; ea.Element.InsideClass;<br />
      }</font>
        </p>
        <p>
          <font face="Courier New">
            <font size="3">
              <font color="#0000ff">
                <font color="#0000ff">private</font>
              </font>
              <font color="#0000ff">
                <font color="#0000ff">void</font>
              </font> ConvertToCustomCaption_HidePreview(<font color="#0000ff"><font color="#0000ff">object</font></font> sender, <font color="#2b91af"><font color="#2b91af">HideContentPreviewEventArgs</font></font></font>
          </font>
          <font face="Courier New">
            <font size="3"> ea)<br />
      {<br />
         <font color="#0000ff"><font color="#0000ff">if</font></font> (_previewWindow
      != <font color="#0000ff"><font color="#0000ff">null</font></font></font>
          </font>
          <font face="Courier New">
            <font size="3">)<br />
         {<br />
            _previewWindow.HidePreview();<br />
            _previewWindow = <font color="#0000ff"><font color="#0000ff">null</font></font></font>
          </font>
          <font size="3">
            <font face="Courier New">;<br />
         }<br /></font>
            <br />
            <font face="Courier New">   _previewRange = </font>
            <font color="#2b91af">
              <font face="Courier New" color="#2b91af">SourceRange</font>
            </font>
          </font>
          <font face="Courier New">
            <font size="3">.Empty;<br />
         <font color="#0000ff"><font color="#0000ff">if</font></font></font>
          </font>
          <font face="Courier New">
            <font size="3"> (_handlingEditorForegroundPaint)<br />
         {<br />
            _handlingEditorForegroundPaint = <font color="#0000ff"><font color="#0000ff">false</font></font></font>
          </font>
          <font face="Courier New">
            <font size="3">;<br />
            <font color="#2b91af"><font color="#2b91af">EventNexus</font></font>.EditorPaintForeground
      += <font color="#0000ff"><font color="#0000ff">new</font></font><font color="#2b91af"><font color="#2b91af">EditorPaintEventHandler</font></font></font>
          </font>
          <font face="Courier New" size="3">(EventNexus_EditorPaintForeground);<br />
         }<br />
      }</font>
        </p>
        <p>
          <font face="Courier New">
            <font size="3">
              <font color="#0000ff">
                <font color="#0000ff">private</font>
              </font>
              <font color="#0000ff">
                <font color="#0000ff">void</font>
              </font> ConvertToCustomCaption_PreparePreview(<font color="#0000ff"><font color="#0000ff">object</font></font> sender, <font color="#2b91af"><font color="#2b91af">PrepareContentPreviewEventArgs</font></font></font>
          </font>
          <font face="Courier New">
            <font size="3"> ea)<br />
      {<br />
         <font color="#2b91af"><font color="#2b91af">PrimitiveExpression</font></font> ele
      = ea.Element <font color="#0000ff"><font color="#0000ff">as</font></font><font color="#2b91af"><font color="#2b91af">PrimitiveExpression</font></font></font>
          </font>
          <font face="Courier New">
            <font size="3">;<br />
         <font color="#0000ff"><font color="#0000ff">if</font></font> (ele
      != <font color="#0000ff"><font color="#0000ff">null</font></font></font>
          </font>
          <font face="Courier New">
            <font size="3">)<br />
         {<br />
            _previewRange = ele.Range.Clone();<br />
            <font color="#2b91af"><font color="#2b91af">EventNexus</font></font>.EditorPaintForeground
      += <font color="#0000ff"><font color="#0000ff">new</font></font><font color="#2b91af"><font color="#2b91af">EditorPaintEventHandler</font></font></font>
          </font>
          <font face="Courier New">
            <font size="3">(EventNexus_EditorPaintForeground);<br />
            CreatePreviewWindow(ea, <font color="#a31515"><font color="#a31515">"Customization.Captions.[New]"</font></font></font>
          </font>
          <font face="Courier New" size="3">);<br />
         }<br />
      }</font>
        </p>
        <p>
          <font face="Courier New">
            <font size="3">
              <font color="#0000ff">
                <font color="#0000ff">private</font>
              </font>
              <font color="#0000ff">
                <font color="#0000ff">void</font>
              </font> CreatePreviewWindow(<font color="#2b91af"><font color="#2b91af">PrepareRefactoringPreviewEventArgs</font></font> ea, <font color="#0000ff"><font color="#0000ff">string</font></font></font>
          </font>
          <font face="Courier New" size="3"> codeToPreview)<br /></font>
          <font face="Courier New">
            <font size="3">{<br />
         _previewWindow = <font color="#0000ff"><font color="#0000ff">new</font></font><font color="#2b91af"><font color="#2b91af">CodePreviewWindow</font></font></font>
          </font>
          <font face="Courier New" size="3">(ea.TextView,
      _previewRange.Top);<br />
         _previewWindow.AddCode(codeToPreview);<br />
         _previewWindow.ShowPreview();<br />
      }</font>
        </p>
        <p>
          <font face="Courier New">
            <font size="3">
              <font color="#0000ff">
                <font color="#0000ff">private</font>
              </font>
              <font color="#0000ff">
                <font color="#0000ff">void</font>
              </font> InvalidatePreviews(<font color="#2b91af"><font color="#2b91af">RefactoringPreviewEventArgs</font></font></font>
          </font>
          <font face="Courier New">
            <font size="3"> ea)<br />
      {<br />
         <font color="#0000ff"><font color="#0000ff">if</font></font></font>
          </font>
          <font size="3">
            <font face="Courier New"> (_previewRange.IsEmpty)<br />
            <font color="#0000ff"><font color="#0000ff">return</font></font></font>
            <font face="Courier New">;</font>
          </font>
        </p>
        <p>
          <font color="#0000ff">
            <font face="Courier New" color="#0000ff" size="3">   int</font>
          </font>
          <font face="Courier New">
            <font size="3"> doubleSpaceWidth
      = ea.TextView.SpaceWidth * 2;<br />
         <font color="#0000ff"><font color="#0000ff">int</font></font></font>
          </font>
          <font face="Courier New">
            <font size="3"> textViewLineHeight
      = ea.TextView.LineHeight;<br />
         <font color="#2b91af"><font color="#2b91af">Rectangle</font></font></font>
          </font>
          <font face="Courier New" size="3"> previewRect
      = ea.TextView.GetRectangleFromRange(_previewRange);<br />
         previewRect.Inflate(doubleSpaceWidth, textViewLineHeight);<br />
         </font>
          <font size="3">
            <font face="Courier New">ea.TextView.Invalidate(previewRect);<br /></font>
            <font face="Courier New">}</font>
          </font>
        </p>
        <p>
          <font face="Courier New">
            <font size="3">
              <font color="#0000ff">
                <font color="#0000ff">void</font>
              </font> EventNexus_EditorPaintForeground(<font color="#2b91af"><font color="#2b91af">EditorPaintEventArgs</font></font></font>
          </font>
          <font face="Courier New">
            <font size="3"> ea)<br />
      {<br />
         <font color="#0000ff"><font color="#0000ff">if</font></font></font>
          </font>
          <font size="3">
            <font face="Courier New"> (_previewRange.IsEmpty)<br />
            <font color="#0000ff"><font color="#0000ff">return</font></font></font>
            <font face="Courier New">;</font>
          </font>
        </p>
        <p>
          <font face="Courier New">
            <font size="3">
              <font color="#0000ff">
                <font color="#0000ff">   using</font>
              </font> (<font color="#2b91af"><font color="#2b91af">StrikeThrough</font></font> strikeThrough
      = <font color="#0000ff"><font color="#0000ff">new</font></font><font color="#2b91af"><font color="#2b91af">StrikeThrough</font></font></font>
          </font>
          <font size="3">
            <font face="Courier New">())<br />
         {<br />
            strikeThrough.TextView = ea.TextView;<br />
            strikeThrough.FillColor = <font color="#2b91af"><font color="#2b91af">Color</font></font></font>
          </font>
          <font face="Courier New" size="3">.Red;<br />
            strikeThrough.Range = _previewRange;<br />
            strikeThrough.Paint(ea.Graphics);<br />
         }<br />
      }</font>
          <font size="1">
          </font>
        </p>
        <p>
          <font size="3">The "thingy" that let's me enter the text is just a simple WinForm
      represented by ui.CustomCaption, I won't bore you with that implemetentation since
      it is fairly <strike>tightly coupled</strike> intergrated into my architecture.</font>
        </p>
        <p>
          <font size="3">Enjoy!</font>
        </p>
        <p>
          <font size="3">-ec</font>
        </p>
        <font size="1">
        </font>
        <img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=559c2673-0a20-4525-b013-42173554b876" />
      </body>
      <title>Custom String to Resource Refactoring with DXCore</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,559c2673-0a20-4525-b013-42173554b876.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,559c2673-0a20-4525-b013-42173554b876.aspx</link>
      <pubDate>Wed, 26 Nov 2008 20:36:25 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;font size=3&gt;In my ChaosFilter project, I'm factoring all the text and strings into
   a resource class.&amp;nbsp; The intent is to allow for customization by the end user for
   different installations and possibly translation at some point.&amp;nbsp; My solution
   is to place all my text into a class with properties that figure out how to get the
   text based based upon a unique key and context (which company/application they are
   running in).&amp;nbsp; Currently these are stored in the database and then loaded into
   a cached dictionary object.&amp;nbsp; This appears to work very fast, however with my
   architecture and a bit of code gen this could easily be replaced by more traditional
   resources.&amp;nbsp; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;In the past it's been a pain the a** since I needed to create the label,
   put the marker into my class file then insert the field into the database.&amp;nbsp; A
   better solution certainly exists.&amp;nbsp; My solution is to build a DXCore custom refactoring.&amp;nbsp;
   The idea would be if I'm in a C# class&amp;nbsp;within a string literal or an ASP.NET
   page within some static HTML, I could hit the refacting key and and take that text
   and convert it into a&amp;nbsp;message or a simple label.&amp;nbsp; The difference being a
   label is only a few words where the message could be sentance or two.&amp;nbsp; For larger
   blocks of text I have a different approach.&lt;/font&gt;
&lt;/p&gt;
&lt;h4&gt;My Solution
&lt;/h4&gt;
&lt;p&gt;
   &lt;font size=3&gt;For a ASP.NET page:&lt;br&gt;
   &lt;/font&gt;&lt;img src="http://www.efficientcoder.com/content/binary/ASPNETRefactoring.gif" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;For a C# code file (in a library assembly or code behind):&lt;/font&gt;
   &lt;br&gt;
   &lt;img src="http://www.efficientcoder.com/content/binary/CSRefactorings.gif" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;Then to enter the text:&lt;/font&gt;
   &lt;br&gt;
   &lt;img src="http://www.efficientcoder.com/content/binary/FieldEditor.gif" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;So how was this done?&amp;nbsp; Actually it was fairly trivial, I built part
   of it early this week in a couple hours, the rest this morning.&amp;nbsp; Probably &amp;lt;
   4 hours for the whole thing and I haven't built a plugin for a couple years.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;h4&gt;Getting Started
&lt;/h4&gt;
&lt;p&gt;
   &lt;font size=3&gt;This link does a much better job than I could to show the basics of creating
   a DXCore plugin, but unless I missed it, it didn't cover too much about creating custom&amp;nbsp;refactorings.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;a href="http://community.devexpress.com/forums/t/68994.aspx"&gt;http://community.devexpress.com/forums/t/68994.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;So assuming that you have the frameworks setup for your plugin (I'm going
   to skip a few steps not relevant and found elsewhere), here's what you need to do:&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;1) Create a new DXCore Plug for your refactoring:&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;&lt;img src="http://www.efficientcoder.com/content/binary/CreatePlugin.gif" border=0&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;2) By default the Refactoring Provider that you need to create a custom
   Refactoring is not in the toolbox, it can be added by "Choose Items" and selecting
   the RefactoringProvider&lt;/font&gt;
   &lt;br&gt;
   &lt;img src="http://www.efficientcoder.com/content/binary/RefactoringProvider.gif" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;3) Once you add that, drop that onto your custom design surface for your
   Refactoring plugin, it should look something boring like:&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.efficientcoder.com/content/binary/RefactorDesigner.gif" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;4) The click on Properties for your component and add appropriate values:&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.efficientcoder.com/content/binary/RefactorProperties.gif" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;5) Now go in and click on the highlighed events to build up your stubs:&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.efficientcoder.com/content/binary/RefactorEvents.gif" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;6) Finally go in and add your code (painting code from: &lt;a href="http://tinyurl.com/5a3pe2"&gt;http://tinyurl.com/5a3pe2&lt;/a&gt;):&lt;/font&gt;
&lt;/p&gt;
&lt;font size=1&gt; 
&lt;p&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;private&lt;/font&gt;&lt;/font&gt; &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;bool&lt;/font&gt;&lt;/font&gt; _handlingEditorForegroundPaint
= &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;false&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt;;&lt;br&gt;
&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;private&lt;/font&gt;&lt;/font&gt; &lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;SourceRange&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt; _previewRange;&lt;br&gt;
&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;private&lt;/font&gt;&lt;/font&gt; DevExpress.CodeRush.UserControls.&lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;CodePreviewWindow&lt;/font&gt;&lt;/font&gt; _previewWindow
= &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;null&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size=3&gt;;&lt;br&gt;
&lt;/font&gt;&gt;
&lt;p&gt;
   &lt;font color=#008000&gt;&lt;font color=#008000&gt;&lt;font face="Courier New" size=3&gt;// DXCore-generated
   code...&lt;/font&gt;
&lt;/p&gt;
&gt;&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt; 
&lt;p&gt;
   &lt;font face="Courier New" size=3&gt;#region&lt;/font&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt; InitializePlugIn&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;#region&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000&gt; FinalizePlugIn&lt;/font&gt;&lt;/font&gt;&gt;
&lt;/font&gt; 
&lt;p&gt;
   &lt;font face="Courier New"&gt;&lt;font size=3&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;private&lt;/font&gt;&lt;/font&gt; &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;void&lt;/font&gt;&lt;/font&gt; ConvertToCustomCaption_Apply(&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;object&lt;/font&gt;&lt;/font&gt; sender, &lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;ApplyContentEventArgs&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt; ea)&lt;br&gt;
   {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;var&lt;/font&gt;&lt;/font&gt; customLabel
   = &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;new&lt;/font&gt;&lt;/font&gt; ui.&lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;CustomCaption&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt;();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;ea.Element.SelectFullBlock();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;customLabel.ShowWithString(&lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;CodeRush&lt;/font&gt;&lt;/font&gt;.Selection.Text, &lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;CodeRush&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt;.Caret.ScreenPosition);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;if&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt; (!customLabel.Cancelled)&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ea.Selection.Text = &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;string&lt;/font&gt;&lt;/font&gt;.Format(&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;"Customization.Captions.{0}"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size=3&gt;,
   customLabel.LabelKey);&lt;br&gt;
   }&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font face="Courier New"&gt;&lt;font size=3&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;private&lt;/font&gt;&lt;/font&gt; &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;void&lt;/font&gt;&lt;/font&gt; ConvertToCustomCaption_CheckAvailability(&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;object&lt;/font&gt;&lt;/font&gt; sender, &lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;CheckContentAvailabilityEventArgs&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size=3&gt; ea)&lt;br&gt;
   &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt;{&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;ea.Available = &lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;CodeRush&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size=3&gt;.Caret.InsideString
   &amp;amp;&amp;amp; ea.Element.InsideClass;&lt;br&gt;
   }&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font face="Courier New"&gt;&lt;font size=3&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;private&lt;/font&gt;&lt;/font&gt; &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;void&lt;/font&gt;&lt;/font&gt; ConvertToCustomCaption_HidePreview(&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;object&lt;/font&gt;&lt;/font&gt; sender, &lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;HideContentPreviewEventArgs&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt; ea)&lt;br&gt;
   {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;if&lt;/font&gt;&lt;/font&gt; (_previewWindow
   != &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;null&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt;)&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_previewWindow.HidePreview();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_previewWindow = &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;null&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font face="Courier New"&gt;;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
   &lt;/font&gt;
   &lt;br&gt;
   &lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_previewRange = &lt;/font&gt;&lt;font color=#2b91af&gt;&lt;font face="Courier New" color=#2b91af&gt;SourceRange&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt;.Empty;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;if&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt; (_handlingEditorForegroundPaint)&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_handlingEditorForegroundPaint = &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;false&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt;;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;EventNexus&lt;/font&gt;&lt;/font&gt;.EditorPaintForeground
   += &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;new&lt;/font&gt;&lt;/font&gt; &lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;EditorPaintEventHandler&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size=3&gt;(EventNexus_EditorPaintForeground);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
   }&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font face="Courier New"&gt;&lt;font size=3&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;private&lt;/font&gt;&lt;/font&gt; &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;void&lt;/font&gt;&lt;/font&gt; ConvertToCustomCaption_PreparePreview(&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;object&lt;/font&gt;&lt;/font&gt; sender, &lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;PrepareContentPreviewEventArgs&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt; ea)&lt;br&gt;
   {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;PrimitiveExpression&lt;/font&gt;&lt;/font&gt; ele
   = ea.Element &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;as&lt;/font&gt;&lt;/font&gt; &lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;PrimitiveExpression&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt;;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;if&lt;/font&gt;&lt;/font&gt; (ele != &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;null&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt;)&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_previewRange = ele.Range.Clone();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;EventNexus&lt;/font&gt;&lt;/font&gt;.EditorPaintForeground
   += &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;new&lt;/font&gt;&lt;/font&gt; &lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;EditorPaintEventHandler&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt;(EventNexus_EditorPaintForeground);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CreatePreviewWindow(ea, &lt;font color=#a31515&gt;&lt;font color=#a31515&gt;"Customization.Captions.[New]"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size=3&gt;);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
   }&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font face="Courier New"&gt;&lt;font size=3&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;private&lt;/font&gt;&lt;/font&gt; &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;void&lt;/font&gt;&lt;/font&gt; CreatePreviewWindow(&lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;PrepareRefactoringPreviewEventArgs&lt;/font&gt;&lt;/font&gt; ea, &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;string&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size=3&gt; codeToPreview)&lt;br&gt;
   &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt;{&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;_previewWindow = &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;new&lt;/font&gt;&lt;/font&gt; &lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;CodePreviewWindow&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size=3&gt;(ea.TextView,
   _previewRange.Top);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;_previewWindow.AddCode(codeToPreview);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;_previewWindow.ShowPreview();&lt;br&gt;
   }&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font face="Courier New"&gt;&lt;font size=3&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;private&lt;/font&gt;&lt;/font&gt; &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;void&lt;/font&gt;&lt;/font&gt; InvalidatePreviews(&lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;RefactoringPreviewEventArgs&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt; ea)&lt;br&gt;
   {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;if&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font face="Courier New"&gt; (_previewRange.IsEmpty)&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;return&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font color=#0000ff&gt;&lt;font face="Courier New" color=#0000ff size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt; doubleSpaceWidth
   = ea.TextView.SpaceWidth * 2;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;int&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt; textViewLineHeight
   = ea.TextView.LineHeight;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;Rectangle&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size=3&gt; previewRect
   = ea.TextView.GetRectangleFromRange(_previewRange);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;previewRect.Inflate(doubleSpaceWidth, textViewLineHeight);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font size=3&gt;&lt;font face="Courier New"&gt;ea.TextView.Invalidate(previewRect);&lt;br&gt;
   &lt;/font&gt;&lt;font face="Courier New"&gt;}&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font face="Courier New"&gt;&lt;font size=3&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;void&lt;/font&gt;&lt;/font&gt; EventNexus_EditorPaintForeground(&lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;EditorPaintEventArgs&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size=3&gt; ea)&lt;br&gt;
   {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;if&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font face="Courier New"&gt; (_previewRange.IsEmpty)&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;return&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font face="Courier New"&gt;&lt;font size=3&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;using&lt;/font&gt;&lt;/font&gt; (&lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;StrikeThrough&lt;/font&gt;&lt;/font&gt; strikeThrough
   = &lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;new&lt;/font&gt;&lt;/font&gt; &lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;StrikeThrough&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=3&gt;&lt;font face="Courier New"&gt;())&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strikeThrough.TextView = ea.TextView;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strikeThrough.FillColor = &lt;font color=#2b91af&gt;&lt;font color=#2b91af&gt;Color&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size=3&gt;.Red;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strikeThrough.Range = _previewRange;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strikeThrough.Paint(ea.Graphics);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
   }&lt;/font&gt;&lt;font size=1&gt;
&lt;/p&gt;
&gt; 
&lt;p&gt;
   &lt;font size=3&gt;The "thingy" that let's me enter the text is just a simple WinForm represented
   by ui.CustomCaption, I won't bore you with that implemetentation since it is fairly &lt;strike&gt;tightly
   coupled&lt;/strike&gt; intergrated into my architecture.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;Enjoy!&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;-ec&lt;/font&gt;
&lt;/p&gt;
&lt;font size=1&gt;&lt;/font&gt;&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=559c2673-0a20-4525-b013-42173554b876" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,559c2673-0a20-4525-b013-42173554b876.aspx</comments>
      <category>ASP.NET;DXCore</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=cc557d2f-a902-4262-a458-d9b576ad3255</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,cc557d2f-a902-4262-a458-d9b576ad3255.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,cc557d2f-a902-4262-a458-d9b576ad3255.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=cc557d2f-a902-4262-a458-d9b576ad3255</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="3">OK - maybe everyone else knows this, but after about a year of getting
      so-so support for intellisense in Javascript I downloaded the latest </font>
          <a href="http://code.msdn.microsoft.com/KB958502/Release/ProjectReleases.aspx?ReleaseId=1736">
            <font size="3">hotfix</font>
          </a>
          <font size="3"> and
      hoped that this would fix it...it did not.  Since I have a very unhealthy addiction
      to Intellisense I figured out it was time to do a little troubleshooting and get this
      to work.  When adding the the script tags to my page to get intellisense, my
      Error List now contained the message:<br /><img src="http://www.efficientcoder.com/content/binary/UpdateJScriptIntellisense.gif" border="0" /></font>
        </p>
        <p>
          <font size="3">Error updatign JScript IntelliSense: [SOMEPATH]\Temporary Internet
      Files\Content.IE5\[XXXX]\[XXX].js 'jQuery' is undefiend @ 9.1</font>
        </p>
        <p>
          <font size="3">So I figured if I could make this error go away chance are pretty good
      IntelliSense would start working again.  What I found is if you use the absolute
      path <font face="Courier New">/FOO/FEE.JS</font> in your script tag you get this
      error message.  If you don't and use a relative path <font face="Courier New">../FOO/FEE.JS</font> all
      is well.</font>
        </p>
        <p>
          <font size="3">One other thing I found while searching the web (sorry I forgot the
      site so I can't give the person credit) is to get your Intellisense to work when using
      Masterpages<br /><img src="http://www.efficientcoder.com/content/binary/JScriptMasterPage.gif" border="0" /><br /></font>
          <font size="3">This allows for the design time to pickup the script file, but
      at run time the file won't be duplicated, especially since my JS files stored as a
      resource in.  I have my JS files compiled as an embedded resource and for some
      reason, adding those embedded resources to the ScriptManager, Scripts sections doesn't
      allow IntelliSense to add the files as you would expect.  Maybe in another year
      I'll get around to troubleshooting that, time to get some work done!</font>
        </p>
        <p>
          <font size="3">-ec</font>
        </p>
        <img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=cc557d2f-a902-4262-a458-d9b576ad3255" />
      </body>
      <title>VS.NET 2008 Javascript IntelliSense Troubleshooting</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,cc557d2f-a902-4262-a458-d9b576ad3255.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,cc557d2f-a902-4262-a458-d9b576ad3255.aspx</link>
      <pubDate>Sat, 22 Nov 2008 15:07:43 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;font size=3&gt;OK - maybe everyone else knows this, but after about a year of getting
   so-so support for intellisense in Javascript I downloaded the latest &lt;/font&gt;&lt;a href="http://code.msdn.microsoft.com/KB958502/Release/ProjectReleases.aspx?ReleaseId=1736"&gt;&lt;font size=3&gt;hotfix&lt;/font&gt;&lt;/a&gt;&lt;font size=3&gt; and
   hoped that this would fix it...it did not.&amp;nbsp; Since I have a very unhealthy addiction
   to Intellisense I figured out it was time to do a little troubleshooting and get this
   to work.&amp;nbsp; When adding the the script tags to my page to get intellisense, my
   Error List now contained the message:&lt;br&gt;
   &lt;img src="http://www.efficientcoder.com/content/binary/UpdateJScriptIntellisense.gif" border=0&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;Error updatign JScript IntelliSense: [SOMEPATH]\Temporary Internet Files\Content.IE5\[XXXX]\[XXX].js
   'jQuery' is undefiend @ 9.1&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;So I figured if I could make this error go away chance are pretty good
   IntelliSense would start working again.&amp;nbsp; What I found is if you use the absolute
   path &lt;font face="Courier New"&gt;/FOO/FEE.JS&lt;/font&gt;&amp;nbsp;in your script tag you get this
   error message.&amp;nbsp; If you don't and use a relative path&amp;nbsp;&lt;font face="Courier New"&gt;../FOO/FEE.JS&lt;/font&gt; all
   is well.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;One other thing I found while searching the web (sorry I forgot the site
   so I can't give the person credit) is to get your Intellisense to work when using
   Masterpages&lt;br&gt;
   &lt;img src="http://www.efficientcoder.com/content/binary/JScriptMasterPage.gif" border=0&gt;
   &lt;br&gt;
   &lt;/font&gt;&lt;font size=3&gt;This allows for the design time to pickup the script file, but
   at run time the file won't be duplicated, especially since my JS files stored as a
   resource in.&amp;nbsp; I have my JS files compiled as an embedded resource and for some
   reason, adding those embedded resources to the ScriptManager, Scripts sections doesn't
   allow IntelliSense to add the files as you would expect.&amp;nbsp; Maybe in another year
   I'll get around to troubleshooting that, time to get some work done!&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;-ec&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=cc557d2f-a902-4262-a458-d9b576ad3255" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,cc557d2f-a902-4262-a458-d9b576ad3255.aspx</comments>
      <category>AJAX;ASP.NET;JScript</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=179d71d5-df26-4c45-bcae-372ed0b1dc92</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,179d71d5-df26-4c45-bcae-372ed0b1dc92.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,179d71d5-df26-4c45-bcae-372ed0b1dc92.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=179d71d5-df26-4c45-bcae-372ed0b1dc92</wfw:commentRss>
      <title>One reason I like Silverlight/WPF</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,179d71d5-df26-4c45-bcae-372ed0b1dc92.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,179d71d5-df26-4c45-bcae-372ed0b1dc92.aspx</link>
      <pubDate>Sun, 16 Nov 2008 18:56:42 GMT</pubDate>
      <description>&lt;img style="FLOAT: right" src="http://www.efficientcoder.com/content/binary/logo.jpg" border=0&gt; 
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&lt;font size=3&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;Early
   on in my career I was mentored on deferring execution.&amp;nbsp; This was in a language
   called FORTH and the idea was build your program structure and abstract the details
   into WORDS to be filled in later.&amp;nbsp; Repeat until complete.&amp;nbsp; This simple process
   still holds true today in OO languages like C# where I do most of my work.&lt;o:p&gt;&lt;/o:p&gt;
   &lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&lt;font size=3&gt;Now
   back to why I like Silverlight/WPF, as I'm just starting to get beyond the basics,
   the more I'm starting to see that this is an extremely well thought out architecture.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;As
   I'm developing my functionality I can easily "defer execution" or really in this case,
   care zero about the style and then go in later and make it pretty.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Or
   if I'm really lucky find someone that knows what they are doing to give it a polished
   look.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Although the same can be done with
   HTML and CSS, this just seems like it's just a bit cleaner and since we are targetting
   only one type of client (Silverlight or WPF) instead of the different browsers the
   results are much more repeatable.&lt;o:p&gt;&lt;/o:p&gt;
   &lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&lt;font size=3&gt;The
   other thing I'm really impressed with is the separation of UI and code behind.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Although
   time will tell on the actual business value (read ability to maintain and extend)
   it seems like the ability to create CLR instances in the XAML and then glue everything
   together with dependency properties, just feels good to do.&lt;o:p&gt;&lt;/o:p&gt;
   &lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&lt;font size=3&gt;Now
   back to getting some work done with this!&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&lt;font size=3&gt;-ec&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=179d71d5-df26-4c45-bcae-372ed0b1dc92" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,179d71d5-df26-4c45-bcae-372ed0b1dc92.aspx</comments>
      <category>.NET 3.5;ASP.NET;Silverlight</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=bff0f6b4-4e82-471f-b0ff-3ef47714d751</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,bff0f6b4-4e82-471f-b0ff-3ef47714d751.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,bff0f6b4-4e82-471f-b0ff-3ef47714d751.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=bff0f6b4-4e82-471f-b0ff-3ef47714d751</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="3">In all my web sites my pages inherit from a custom base page that inherits
      from <font face="Courier New">System.Web.UI.Page</font> and overrides <font face="Courier New">OnError</font>. 
      This method then uses <font face="Courier New">Server.GetLastError()</font> to get
      the exception generated by the offending code.  At this point, it's probably
      too late to do anything about it, but at least I can take a snap shot of the current user
      context, log that information present a friendly message to the user.  Although
      the bug made it into production at least it's not happening 200 times a day and I
      don't know about.</font>
        </p>
        <p>
          <font size="3">A good portion of my site is driven by web services via AJAX and as
      I start to implement Silverlight for a few sophisticated UI components, I'm relying
      more and more on web services.  My problem until now was I didn't have any sort
      of catch-all that notified me about problem in a web service call.</font>
        </p>
        <p>
          <font size="3">After a bit of research I found something called a <font face="Courier New">SoapExtension</font> in
      the <font face="Courier New">System.Web.Services.Protocols</font> namespace.</font>
        </p>
        <p>
          <font size="3">This provides calls at different points in the processing of the soap
      message:<br /><img src="http://www.efficientcoder.com/content/binary/SoapMessageStage.gif" border="0" /></font>
        </p>
        <p>
          <font size="3">We can implement some functionality in the AfterSerialize stage. 
      If we detect a non-null value in the message.Exception property it's probably safe
      to assume something bad happened within the web service.<br /></font>
        </p>
        <p>
          <font size="3">
            <img src="http://www.efficientcoder.com/content/binary/CustomSoapHandling.gif" border="0" />
          </font>
        </p>
        <p>
          <font size="3">The final step is to register this in the web.config file.</font>
        </p>
        <p>
          <font size="3">
            <img src="http://www.efficientcoder.com/content/binary/CustomSoapWebConfig.gif" border="0" />
          </font>
        </p>
        <p>
          <font size="3">In addition SoapExtensions can be associated with specific methods
      via attributes.  This might be interesting to provide an interesting solution
      for attaching custom authentication and authorization.</font>
        </p>
        <p>
          <font size="3">-ec</font>
        </p>
        <img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=bff0f6b4-4e82-471f-b0ff-3ef47714d751" />
      </body>
      <title>SoapExceptions and Global Exception Logging</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,bff0f6b4-4e82-471f-b0ff-3ef47714d751.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,bff0f6b4-4e82-471f-b0ff-3ef47714d751.aspx</link>
      <pubDate>Wed, 05 Nov 2008 13:27:49 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;font size=3&gt;In all my web sites my pages inherit from a custom base page that inherits
   from &lt;font face="Courier New"&gt;System.Web.UI.Page&lt;/font&gt; and&amp;nbsp;overrides &lt;font face="Courier New"&gt;OnError&lt;/font&gt;.&amp;nbsp;
   This method then uses &lt;font face="Courier New"&gt;Server.GetLastError()&lt;/font&gt; to get
   the exception generated by the offending code.&amp;nbsp; At this point, it's probably
   too late to do anything about it, but at least I can take a snap shot of the current&amp;nbsp;user
   context, log that information&amp;nbsp;present a friendly message to the user.&amp;nbsp; Although
   the bug made it into production at least it's not happening 200 times a day and I
   don't know about.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;A good portion of my site is driven by web services via AJAX and as I
   start to implement Silverlight for a few sophisticated UI components, I'm relying
   more and more on web services.&amp;nbsp; My problem until now was I didn't have any sort
   of catch-all that notified me about problem in a web service call.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;After a bit of research I found something called a &lt;font face="Courier New"&gt;SoapExtension&lt;/font&gt; in
   the &lt;font face="Courier New"&gt;System.Web.Services.Protocols&lt;/font&gt; namespace.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;This provides calls at different points in the processing of the soap
   message:&lt;br&gt;
   &lt;img src="http://www.efficientcoder.com/content/binary/SoapMessageStage.gif" border=0&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;We can implement some functionality in the AfterSerialize stage.&amp;nbsp;
   If we detect a non-null value in the message.Exception property it's probably safe
   to assume something bad happened within the web service.&lt;br&gt;
   &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;&lt;img src="http://www.efficientcoder.com/content/binary/CustomSoapHandling.gif" border=0&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;The final step is to register this in the web.config file.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;&lt;img src="http://www.efficientcoder.com/content/binary/CustomSoapWebConfig.gif" border=0&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;In addition SoapExtensions can be associated with specific methods via
   attributes.&amp;nbsp; This might be interesting to provide an interesting solution for
   attaching custom authentication and authorization.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;-ec&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=bff0f6b4-4e82-471f-b0ff-3ef47714d751" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,bff0f6b4-4e82-471f-b0ff-3ef47714d751.aspx</comments>
      <category>ASP.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=3257d29f-9390-400d-a1b1-b8fc8ca745bc</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,3257d29f-9390-400d-a1b1-b8fc8ca745bc.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,3257d29f-9390-400d-a1b1-b8fc8ca745bc.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=3257d29f-9390-400d-a1b1-b8fc8ca745bc</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="3">I've finally found a good excuse to implement something using <a href="http://weblogs.asp.net/scottgu/archive/2008/02/22/first-look-at-silverlight-2.aspx">Silverlight
      2.0</a> within my web product.  After spending about 3-4 hours attempting to
      get my Silverlight app to talk to a local web service, I found out something that
      hopefully will save you some time.  First a little about my environment. 
      I'm using IIS 7.0 on a 64 bit machine.  I have IIS setup with two sites for my
      Silverlight development, the first hosts my web service, the second hosts the web
      site containing my Silverlight application.  I have my hosts file setup
      as follows</font>
        </p>
        <p>
          <font size="3">127.0.0.1   webservice<br />
      127.0.0.1   website</font>
        </p>
        <p>
          <font size="3">Then in IIS I bind the the web sites to those host names.</font>
        </p>
        <p>
          <font size="3">After setting up the </font>
          <a href="http://msdn.microsoft.com/en-us/library/cc197955(VS.95).aspx">
            <font size="3">clientaccesspolicy.xml</font>
          </a>
          <font size="3"> file
      in my webservice site to allow Silverlight to access I just couldn't get my Silverlight
      app to talk to my web service.  I tried this in both IE and Firefox with no luck. 
      After doing a little testing, I found it worked when I used the development web
      server (I think this was formally called cassini) it also seemed to work when
      when I used the host name "localhost".  Next I fired up </font>
          <a href="http://www.fiddlertool.com/fiddler/">
            <font size="3">fiddler</font>
          </a>
          <font size="3"> and
      watched the network traffic.  Anytime I used cassini or local host, the clientaccesspolicy.xml
      was downloaded and the call to the web service </font>
          <font size="3">
            <span style="COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'">succeeded. 
      If I tried this through my site, no request was made.</span>
          </font>
        </p>
        <p>
          <font size="3">
            <span style="COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'">After
      trying a number of things I found I was able to get this working by opening the security
      settings within Internet Explorer</span>
          </font>
        </p>
        <p>
          <font size="3">
            <span style="COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'">Tools-&gt;Internet
      Options-&gt;Security Tab, then click on Local Intranet and add my two sites. 
      This seemed to do the trick for both Internet Explorer and Firefox.</span>
          </font>
        </p>
        <p>
          <font size="3">
            <span style="COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'">Hope
      this saves you a bit of time</span>
          </font>
        </p>
        <p>
          <font size="3">
            <span style="COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'">-ec</span>
          </font>
          <font size="3"> </font>
        </p>
        <img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=3257d29f-9390-400d-a1b1-b8fc8ca745bc" />
      </body>
      <title>Local Silverlight Development and clientaccesspolicy.html</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,3257d29f-9390-400d-a1b1-b8fc8ca745bc.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,3257d29f-9390-400d-a1b1-b8fc8ca745bc.aspx</link>
      <pubDate>Tue, 04 Nov 2008 01:50:58 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;font size=3&gt;I've finally found a good excuse to implement something using &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/02/22/first-look-at-silverlight-2.aspx"&gt;Silverlight
   2.0&lt;/a&gt; within my web product.&amp;nbsp; After spending about 3-4 hours attempting to
   get my Silverlight app to talk to a local web service, I found out something that
   hopefully will save you some time.&amp;nbsp; First a little about my environment.&amp;nbsp;
   I'm using IIS 7.0 on a 64 bit machine.&amp;nbsp; I have IIS setup with two sites for my
   Silverlight development, the first hosts my web service, the second hosts the web
   site containing my Silverlight application.&amp;nbsp; I have&amp;nbsp;my hosts file setup
   as follows&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;127.0.0.1&amp;nbsp;&amp;nbsp;&amp;nbsp;webservice&lt;br&gt;
   127.0.0.1&amp;nbsp;&amp;nbsp;&amp;nbsp;website&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;Then in IIS I bind the the web sites to those host names.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;After setting up the &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc197955(VS.95).aspx"&gt;&lt;font size=3&gt;clientaccesspolicy.xml&lt;/font&gt;&lt;/a&gt;&lt;font size=3&gt; file
   in my webservice site to allow Silverlight to access I just couldn't get my Silverlight
   app to talk to my web service.&amp;nbsp; I tried this in both IE and Firefox with no luck.&amp;nbsp;
   After doing a little testing, I found it worked when I used the&amp;nbsp;development web
   server (I think this was formally called cassini)&amp;nbsp;it also seemed to work when
   when I used the host name "localhost".&amp;nbsp; Next I fired up &lt;/font&gt;&lt;a href="http://www.fiddlertool.com/fiddler/"&gt;&lt;font size=3&gt;fiddler&lt;/font&gt;&lt;/a&gt;&lt;font size=3&gt; and
   watched the network traffic.&amp;nbsp; Anytime I used cassini or local host, the clientaccesspolicy.xml
   was downloaded and the call to the web service &lt;/font&gt;&lt;font size=3&gt;&lt;span style="COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;succeeded.&amp;nbsp;
   If I tried this through my site, no request was made.&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;&lt;span style="COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;After
   trying a number of things I found I was able to get this working by opening the security
   settings within Internet Explorer&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;&lt;span style="COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Tools-&amp;gt;Internet
   Options-&amp;gt;Security Tab, then click on Local Intranet and add my two sites.&amp;nbsp;
   This seemed to&amp;nbsp;do the trick for both Internet Explorer and Firefox.&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;&lt;span style="COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Hope
   this saves you a bit of time&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;&lt;span style="COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;-ec&lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=3257d29f-9390-400d-a1b1-b8fc8ca745bc" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,3257d29f-9390-400d-a1b1-b8fc8ca745bc.aspx</comments>
      <category>ASP.NET;Silverlight</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=a632aed5-b8b7-4313-aaea-42973be21304</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,a632aed5-b8b7-4313-aaea-42973be21304.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,a632aed5-b8b7-4313-aaea-42973be21304.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=a632aed5-b8b7-4313-aaea-42973be21304</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <img style="FLOAT: right" src="http://www.efficientcoder.com/content/binary/AWSLogo.png" border="0" />
        <p>
          <font size="3">I have the need in my application for users to upload many different
      types of documents and images.  Currently I have two ways of doing this;
      the first is to save to a set of directories organzied by user in a file system,
      the second is in the data base.  Neither of these are really ideal for many reasons
      that I'm sure you recognize.  To resolve this issue, I built a component that
      extends the ASP.NET file upload control to allow you to save files to the Amazon Simple
      Storage Servce (S3).  I've released the source code and component with an open
      source license, so you can download this and use in your projects as well.  The
      download as well as documentation can be found at </font>
          <a href="http://downloads.slsys.net/S3FileUpload/Default.aspx">
            <font size="3">http://downloads.slsys.net/S3FileUpload/Default.aspx</font>
          </a>
          <font size="3">.</font>
        </p>
        <p>
          <font size="3">Enjoy and feedback is appreciated!</font>
        </p>
        <p>
          <font size="3">-ec</font>
        </p>
        <img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=a632aed5-b8b7-4313-aaea-42973be21304" />
      </body>
      <title>Introducing the ASP.NET S3FileUpload Control</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,a632aed5-b8b7-4313-aaea-42973be21304.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,a632aed5-b8b7-4313-aaea-42973be21304.aspx</link>
      <pubDate>Mon, 21 Jul 2008 11:39:54 GMT</pubDate>
      <description>&lt;img style="FLOAT: right" src="http://www.efficientcoder.com/content/binary/AWSLogo.png" border=0&gt; 
&lt;p&gt;
   &lt;font size=3&gt;I have the need in my application for users to upload many different
   types of documents and images.&amp;nbsp;&amp;nbsp;Currently I have two ways of doing this;
   the first is to&amp;nbsp;save to a set of directories organzied by user in a file system,
   the second is in the data base.&amp;nbsp; Neither of these are really ideal for many reasons
   that I'm sure you recognize.&amp;nbsp; To resolve this issue, I built a component that
   extends the ASP.NET file upload control to allow you to save files to the Amazon Simple
   Storage Servce (S3).&amp;nbsp; I've released the source code and component with an open
   source license, so you can download this and use in your projects as well.&amp;nbsp; The
   download as well as documentation can be found at &lt;/font&gt;&lt;a href="http://downloads.slsys.net/S3FileUpload/Default.aspx"&gt;&lt;font size=3&gt;http://downloads.slsys.net/S3FileUpload/Default.aspx&lt;/font&gt;&lt;/a&gt;&lt;font size=3&gt;.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;Enjoy and feedback is appreciated!&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=3&gt;-ec&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=a632aed5-b8b7-4313-aaea-42973be21304" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,a632aed5-b8b7-4313-aaea-42973be21304.aspx</comments>
      <category>ASP.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=abf57d34-998b-41e1-b085-9688c909dbce</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,abf57d34-998b-41e1-b085-9688c909dbce.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,abf57d34-998b-41e1-b085-9688c909dbce.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=abf57d34-998b-41e1-b085-9688c909dbce</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <title>JSON Script Ignore Tags</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,abf57d34-998b-41e1-b085-9688c909dbce.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,abf57d34-998b-41e1-b085-9688c909dbce.aspx</link>
      <pubDate>Thu, 12 Jun 2008 15:07:58 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;I've
   built some ASMX web services (yes these should be converted to WCF, but they work
   for now).&amp;nbsp; I'm starting to use these as Script Services for some ASP.NET Ajax
   Enabled pages.&amp;nbsp; I ran into a problem where some of the "stuff" I didn't want
   to have happen in some properties on the objects returned by the server were getting
   executed even though they were marked as &lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes"&gt;&lt;font size=4&gt;&lt;font color=#000000&gt;[&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;XmlIgnore&lt;/span&gt;&lt;/font&gt;&lt;font color=#000000&gt;&lt;font size=4&gt;()]&lt;/font&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;which
   disables them for SOAP tASMX type web calls.&amp;nbsp; Apparently when the returned objects
   get serialized as JSON for a script service, they ignore the &lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes"&gt;&lt;font size=4&gt;&lt;font color=#000000&gt;[&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;XmlIgnore&lt;/span&gt;&lt;/font&gt;&lt;font color=#000000&gt;&lt;font size=4&gt;()]&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; tag,
   which I guess makes sense but is rather&amp;nbsp;&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;inconvenient,
   in that I need to go back and do a manual search &amp;amp; change&lt;/span&gt;.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Within
   the &lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: Consolas; mso-no-proof: yes"&gt;&lt;font size=4&gt;using&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;font size=4&gt; System.Web.Script.Serialization&lt;/font&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;namespace
   there is another attribute you can decorate your properties with called &lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: Consolas; mso-no-proof: yes"&gt;&lt;font size=4&gt;&lt;font color=#000000&gt;[&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;ScriptIgnore&lt;/span&gt;&lt;font color=#000000&gt;()]&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt; that
   seems to do the trick.&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;-ec&lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=abf57d34-998b-41e1-b085-9688c909dbce" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,abf57d34-998b-41e1-b085-9688c909dbce.aspx</comments>
      <category>ASP.NET;WCF;AJAX</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=de0dda52-b7e7-4ce6-80e7-d3a43118eaf3</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,de0dda52-b7e7-4ce6-80e7-d3a43118eaf3.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,de0dda52-b7e7-4ce6-80e7-d3a43118eaf3.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=de0dda52-b7e7-4ce6-80e7-d3a43118eaf3</wfw:commentRss>
      <title>Annoying VS.NET "Feature" ?Unresolved?</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,de0dda52-b7e7-4ce6-80e7-d3a43118eaf3.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,de0dda52-b7e7-4ce6-80e7-d3a43118eaf3.aspx</link>
      <pubDate>Thu, 05 Jun 2008 12:08:30 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
   &lt;font color=#000000&gt;&lt;font face=Calibri size=4&gt;&lt;strong&gt;Annoying VS.NET "Feature"&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
   &lt;font face=Calibri color=#000000 size=3&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
   &lt;font face=Calibri color=#000000&gt;&lt;font size=3&gt;I have a fairly large ASP.NET application
   that has a large number&amp;nbsp;ASP.NET WebParts built as Custom Controls (150+) in a
   compiled assembly&amp;nbsp;.&amp;nbsp; I've been getting a little annoyed with VS.NET (I'm
   using 2008 right now, but saw the same behavior in 2005) where after I get done compiling
   I have to wait 20-30 seconds while VS.NET does &lt;em&gt;?something?&lt;/em&gt; and freezes the
   UI (can't&amp;nbsp;&lt;em&gt;?someting?&lt;/em&gt; &lt;/font&gt;&lt;font size=3&gt;this be done in a worker thread).&amp;nbsp;
   Anyway I think I've finally figured out what's up, it would appear anytime I open
   anything that requires a designer (including an ASMX page) the tool box get's populated
   with all the custom controls as part of my project.&amp;nbsp; It would seem as soon as
   the tool box is populated it needs to be refreshed and that's what's taking the 20-30
   seconds.&amp;nbsp; So therefore if I don't open anything requiring a designer, I'm OK.&amp;nbsp;
   I think I've gotten used to this for ASPX and ASCX pages since they normally open
   up in the HTML view, but I'm still clicking on ASMX and Services design surfaces and
   end up shutting down VS.NET and restarting without a design surface open.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
   &lt;font face=Calibri color=#000000 size=3&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
   &lt;font face=Calibri color=#000000 size=3&gt;Maybe my project isn't typical, but it sure
   would be nice if I could use design surfaces at some point.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
   &lt;font face=Calibri color=#000000 size=3&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
   &lt;font face=Calibri color=#000000 size=3&gt;-ec&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
   &lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
   &lt;o:p&gt;&lt;/o:p&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=de0dda52-b7e7-4ce6-80e7-d3a43118eaf3" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,de0dda52-b7e7-4ce6-80e7-d3a43118eaf3.aspx</comments>
      <category>.NET 3.5;ASP.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=ef39b316-f38d-4220-898e-f9dd2e818e13</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,ef39b316-f38d-4220-898e-f9dd2e818e13.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,ef39b316-f38d-4220-898e-f9dd2e818e13.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ef39b316-f38d-4220-898e-f9dd2e818e13</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <h4>Upgrading .NET FX 2.0 to .NET FX 3.5 and LINQ
   </h4>
        <p>
      After recently upgrading a web project from the 2.0 framework to 3.5 I attempted to
      use the new language feature LINQ (actually found a really good use for I'll blog
      about later) however I ran into a problem where it wasn't recognizing the LINQ syntax...after
      a bit of research I discovered the following, for the ASP.NET compiler to recognize
      the syntax I need to add the following chunk of xml to my web.config file.  Not
      sure how this works with the compiled ASP.NET apps and my CI environment, if I need
      to do anything else I'll post it...
   </p>
        <p>
          <font color="#0000ff" size="1">&lt;/</font>
          <font color="#a31515" size="1">system.web</font>
          <font color="#0000ff" size="1">&gt;<br /></font>
          <font color="#0000ff" size="1">...<br />
      &lt;</font>
          <font color="#a31515" size="1">system.codedom</font>
          <font color="#0000ff" size="1">&gt;<br />
         &lt;</font>
          <font color="#a31515" size="1">compilers</font>
          <font color="#0000ff" size="1">&gt;<br />
            &lt;</font>
          <font color="#a31515" size="1">compiler</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">language</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">c#;cs;csharp</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">extension</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">.cs</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">warningLevel</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">4</font>
          <font size="1">
            <font color="#000000">"<br />
               </font>
          </font>
          <font color="#ff0000" size="1">type</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">Microsoft.CSharp.CSharpCodeProvider,
      System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">&gt;<br />
            &lt;</font>
          <font color="#a31515" size="1">providerOption</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">name</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">CompilerVersion</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">value</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">v3.5</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">/&gt;<br />
            &lt;</font>
          <font color="#a31515" size="1">providerOption</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">name</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">WarnAsError</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">value</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">false</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">/&gt;<br />
         &lt;/</font>
          <font color="#a31515" size="1">compiler</font>
          <font color="#0000ff" size="1">&gt;<br />
         &lt;</font>
          <font color="#a31515" size="1">compiler</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">language</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">vb;vbs;visualbasic;vbscript</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">extension</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">.vb</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">warningLevel</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">4</font>
          <font size="1">
            <font color="#000000">"<br />
               </font>
          </font>
          <font color="#ff0000" size="1">type</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">Microsoft.VisualBasic.VBCodeProvider,
      System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">&gt;<br />
            &lt;</font>
          <font color="#a31515" size="1">providerOption</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">name</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">CompilerVersion</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">value</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">v3.5</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">/&gt;<br />
            &lt;</font>
          <font color="#a31515" size="1">providerOption</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">name</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">OptionInfer</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">value</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">true</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">/&gt;<br />
            &lt;</font>
          <font color="#a31515" size="1">providerOption</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">name</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">WarnAsError</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">
          </font>
          <font color="#ff0000" size="1">value</font>
          <font color="#0000ff" size="1">=</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">false</font>
          <font color="#000000" size="1">"</font>
          <font color="#0000ff" size="1">/&gt;<br />
         &lt;/</font>
          <font color="#a31515" size="1">compiler</font>
          <font color="#0000ff" size="1">&gt;<br />
      &lt;/</font>
          <font color="#a31515" size="1">compilers</font>
          <font color="#0000ff" size="1">&gt;<br />
      &lt;/</font>
          <font color="#a31515" size="1">system.codedom</font>
          <font color="#0000ff" size="1">&gt;<br />
      ...<br /></font>
          <font color="#0000ff" size="1">&lt;</font>
          <font color="#a31515" size="1">system.webServer</font>
          <font color="#0000ff" size="1">&gt;</font>
        </p>
        <p>
          <font size="1">
            <font size="2">Make sense if you think about it...</font>
          </font>
        </p>
        <p>
          <font color="#0000ff" size="1">
            <font color="#000000" size="2">-ec</font>
          </font>
        </p>
        <img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=ef39b316-f38d-4220-898e-f9dd2e818e13" />
      </body>
      <title>Upgrading .NET FX 2.0 to .NET FX 3.5 and LINQ</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,ef39b316-f38d-4220-898e-f9dd2e818e13.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,ef39b316-f38d-4220-898e-f9dd2e818e13.aspx</link>
      <pubDate>Fri, 28 Dec 2007 16:54:40 GMT</pubDate>
      <description>&lt;h4&gt;Upgrading .NET FX 2.0 to .NET FX 3.5 and LINQ
&lt;/h4&gt;
&lt;p&gt;
   After recently upgrading a web project from the 2.0 framework to 3.5 I attempted to
   use the new language feature LINQ (actually found a really good use for I'll blog
   about later) however I ran into a problem where it wasn't recognizing the LINQ syntax...after
   a bit of research I discovered the following, for the ASP.NET compiler to recognize
   the syntax I need to add the following chunk of xml to my web.config file.&amp;nbsp; Not
   sure how this works with the compiled ASP.NET apps and my CI environment, if I need
   to do anything else I'll post it...
&lt;/p&gt;
&lt;p&gt;
   &lt;font color=#0000ff size=1&gt;&amp;lt;/&lt;/font&gt;&lt;font color=#a31515 size=1&gt;system.web&lt;/font&gt;&lt;font color=#0000ff size=1&gt;&amp;gt;&lt;br&gt;
   &lt;/font&gt;&lt;font color=#0000ff size=1&gt;...&lt;br&gt;
   &amp;lt;&lt;/font&gt;&lt;font color=#a31515 size=1&gt;system.codedom&lt;/font&gt;&lt;font color=#0000ff size=1&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;font color=#a31515 size=1&gt;compilers&lt;/font&gt;&lt;font color=#0000ff size=1&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;font color=#a31515 size=1&gt;compiler&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;language&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;c#;cs;csharp&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;extension&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;.cs&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;warningLevel&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;4&lt;/font&gt;&lt;font size=1&gt;&lt;font color=#000000&gt;"&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;font color=#ff0000 size=1&gt;type&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;Microsoft.CSharp.CSharpCodeProvider,
   System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;font color=#a31515 size=1&gt;providerOption&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;name&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;CompilerVersion&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;value&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;v3.5&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;/&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;font color=#a31515 size=1&gt;providerOption&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;name&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;WarnAsError&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;value&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;false&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;/&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/font&gt;&lt;font color=#a31515 size=1&gt;compiler&lt;/font&gt;&lt;font color=#0000ff size=1&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;font color=#a31515 size=1&gt;compiler&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;language&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;vb;vbs;visualbasic;vbscript&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;extension&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;.vb&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;warningLevel&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;4&lt;/font&gt;&lt;font size=1&gt;&lt;font color=#000000&gt;"&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;font color=#ff0000 size=1&gt;type&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;Microsoft.VisualBasic.VBCodeProvider,
   System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;font color=#a31515 size=1&gt;providerOption&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;name&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;CompilerVersion&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;value&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;v3.5&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;/&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;font color=#a31515 size=1&gt;providerOption&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;name&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;OptionInfer&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;value&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;true&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;/&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;font color=#a31515 size=1&gt;providerOption&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;name&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;WarnAsError&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt; &lt;/font&gt;&lt;font color=#ff0000 size=1&gt;value&lt;/font&gt;&lt;font color=#0000ff size=1&gt;=&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;false&lt;/font&gt;&lt;font color=#000000 size=1&gt;"&lt;/font&gt;&lt;font color=#0000ff size=1&gt;/&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/font&gt;&lt;font color=#a31515 size=1&gt;compiler&lt;/font&gt;&lt;font color=#0000ff size=1&gt;&amp;gt;&lt;br&gt;
   &amp;lt;/&lt;/font&gt;&lt;font color=#a31515 size=1&gt;compilers&lt;/font&gt;&lt;font color=#0000ff size=1&gt;&amp;gt;&lt;br&gt;
   &amp;lt;/&lt;/font&gt;&lt;font color=#a31515 size=1&gt;system.codedom&lt;/font&gt;&lt;font color=#0000ff size=1&gt;&amp;gt;&lt;br&gt;
   ...&lt;br&gt;
   &lt;/font&gt;&lt;font color=#0000ff size=1&gt;&amp;lt;&lt;/font&gt;&lt;font color=#a31515 size=1&gt;system.webServer&lt;/font&gt;&lt;font color=#0000ff size=1&gt;&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font size=1&gt;&lt;font size=2&gt;Make sense if you think about it...&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font color=#0000ff size=1&gt;&lt;font color=#000000 size=2&gt;-ec&lt;/font&gt;
&lt;/p&gt;
&gt;&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=ef39b316-f38d-4220-898e-f9dd2e818e13" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,ef39b316-f38d-4220-898e-f9dd2e818e13.aspx</comments>
      <category>ASP.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=e2aa6570-ad34-432d-9b5d-6617c9191462</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,e2aa6570-ad34-432d-9b5d-6617c9191462.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,e2aa6570-ad34-432d-9b5d-6617c9191462.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=e2aa6570-ad34-432d-9b5d-6617c9191462</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <h4>Upgrade to .NET FX 3.5 - Assembly Binding 
   </h4>
   I've officially converted my main ASP.NET application from 2.0 to 3.5 this morning
   overall it was very painless, for the most part, just adjust the class libraries to
   use the .Net Frameworks 3.5, and modify web.config entries from <font color="#0000ff" face="Courier New">System.Web.UI.Extensions,
   Version 1.0.61025.0<font face="Verdana"><font color="#000000">to</font></font> System.Web.Extensions,
   Version=3.5.0.0.</font>  The problem I ran into was that some of the control
   libraries I was using were compiled against the 2.0 framework.  Adding the following
   keys to the bottom of my web.config files clean that up.<font face="Courier New">&lt;configuration&gt;<br />
     ....<br />
     &lt;runtime&gt;<br />
       &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;<br />
         &lt;dependentAssembly&gt;<br />
           &lt;assemblyIdentity name="System.Web.Extensions"
   publicKeyToken="31bf3856ad364e35"/&gt;<br />
           &lt;bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
   newVersion="3.5.0.0"/&gt;<br />
         &lt;/dependentAssembly&gt;<br />
         &lt;dependentAssembly&gt;<br />
           &lt;assemblyIdentity name="System.Web.Extensions.Design"
   publicKeyToken="31bf3856ad364e35"/&gt;<br />
           &lt;bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
   newVersion="3.5.0.0"/&gt;<br />
         &lt;/dependentAssembly&gt;<br />
       &lt;/assemblyBinding&gt;<br />
     &lt;/runtime&gt;<br />
   &lt;/configuration&gt;<br /></font><br />
   -ec 
   <br /><p></p><img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=e2aa6570-ad34-432d-9b5d-6617c9191462" /></body>
      <title>Upgrade to .NET FX 3.5 - Assembly Binding </title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,e2aa6570-ad34-432d-9b5d-6617c9191462.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,e2aa6570-ad34-432d-9b5d-6617c9191462.aspx</link>
      <pubDate>Mon, 26 Nov 2007 16:41:35 GMT</pubDate>
      <description>&lt;h4&gt;Upgrade to .NET FX 3.5 - Assembly Binding 
&lt;/h4&gt;
I've officially converted my main ASP.NET application from 2.0 to 3.5 this morning
overall it was very painless, for the most part, just adjust the class libraries to
use the .Net Frameworks 3.5, and modify web.config entries from &lt;font color="#0000ff" face="Courier New"&gt;System.Web.UI.Extensions,
Version 1.0.61025.0&lt;font face="Verdana"&gt; &lt;font color="#000000"&gt;to&lt;/font&gt;&lt;/font&gt; System.Web.Extensions,
Version=3.5.0.0.&lt;/font&gt;&amp;nbsp; The problem I ran into was that some of the control
libraries I was using were compiled against the 2.0 framework.&amp;nbsp; Adding the following
keys to the bottom of my web.config files clean that up.&lt;font face="Courier New"&gt;&amp;lt;configuration&amp;gt;&lt;br&gt;
&amp;nbsp; ....&lt;br&gt;
&amp;nbsp; &amp;lt;runtime&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dependentAssembly&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;assemblyIdentity name="System.Web.Extensions"
publicKeyToken="31bf3856ad364e35"/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
newVersion="3.5.0.0"/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dependentAssembly&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dependentAssembly&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;assemblyIdentity name="System.Web.Extensions.Design"
publicKeyToken="31bf3856ad364e35"/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
newVersion="3.5.0.0"/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dependentAssembly&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/assemblyBinding&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/runtime&amp;gt;&lt;br&gt;
&amp;lt;/configuration&amp;gt;&lt;br&gt;
&lt;/font&gt;
&lt;br&gt;
-ec 
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=e2aa6570-ad34-432d-9b5d-6617c9191462" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,e2aa6570-ad34-432d-9b5d-6617c9191462.aspx</comments>
      <category>.NET 3.5;ASP.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=81b34cd8-87ba-4bd7-bb98-93ee8b8dfbc0</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,81b34cd8-87ba-4bd7-bb98-93ee8b8dfbc0.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,81b34cd8-87ba-4bd7-bb98-93ee8b8dfbc0.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=81b34cd8-87ba-4bd7-bb98-93ee8b8dfbc0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="4">VS.NET 2008 &amp; VS.NET 2005 Solution Files</font>
        </p>
        <p>
      I recently made the move to Beta 2 for my main project and so-far-so-good, I haven't
      made the move to the 3.5 framework yet, I probably will as soon as I get the RTM later
      this month.  I'm being a bit cautious and not installing and beta components
      on my build server so I did a little research and found this article on information for
      working with your projects in both VS.NET 2008 and VS.NET 2005 concurrently.
   </p>
        <p>
          <a href="http://west-wind.com/weblog/posts/122975.aspx">http://west-wind.com/weblog/posts/122975.aspx</a>
        </p>
        <p>
      Basically just make a copy of your solution file, then change the "Format Version"
      and "# Visual Studio"
   </p>
        <p>
          <img src="http://www.efficientcoder.com/content/binary/VS2005.png" border="0" />
        </p>
        <p>
      ProjectName_2005.sln
   </p>
        <p>
       
   </p>
        <p>
          <img src="http://www.efficientcoder.com/content/binary/VS2008.png" border="0" />
        </p>
        <p>
      ProjectName_2008.sln
   </p>
        <p>
      From what I can tell so far, the actual project files just aren't a problem.
   </p>
        <p>
      -ec
   </p>
        <img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=81b34cd8-87ba-4bd7-bb98-93ee8b8dfbc0" />
      </body>
      <title>VS.NET 2008 &amp; VS.NET 2005 Solution Files</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,81b34cd8-87ba-4bd7-bb98-93ee8b8dfbc0.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,81b34cd8-87ba-4bd7-bb98-93ee8b8dfbc0.aspx</link>
      <pubDate>Thu, 15 Nov 2007 03:58:26 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;font size=4&gt;VS.NET 2008 &amp;amp; VS.NET 2005 Solution Files&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   I recently made the move to Beta 2 for my main project and so-far-so-good, I haven't
   made the move to the 3.5 framework yet, I probably will as soon as I get the RTM later
   this month.&amp;nbsp;&amp;nbsp;I'm being a bit cautious and not installing and beta components
   on my build server so I did a little research and found this article on&amp;nbsp;information&amp;nbsp;for
   working with your projects in both VS.NET 2008 and VS.NET 2005 concurrently.
&lt;/p&gt;
&lt;p&gt;
   &lt;a href="http://west-wind.com/weblog/posts/122975.aspx"&gt;http://west-wind.com/weblog/posts/122975.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   Basically just make a copy of your solution file, then change the "Format Version"
   and "# Visual Studio"
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.efficientcoder.com/content/binary/VS2005.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   ProjectName_2005.sln
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.efficientcoder.com/content/binary/VS2008.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   ProjectName_2008.sln
&lt;/p&gt;
&lt;p&gt;
   From what I can tell so far, the actual project files just aren't a problem.
&lt;/p&gt;
&lt;p&gt;
   -ec
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=81b34cd8-87ba-4bd7-bb98-93ee8b8dfbc0" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,81b34cd8-87ba-4bd7-bb98-93ee8b8dfbc0.aspx</comments>
      <category>ASP.NET;Continuous Integration</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=28b409b2-af73-45d8-b05f-5290504fcd34</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,28b409b2-af73-45d8-b05f-5290504fcd34.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,28b409b2-af73-45d8-b05f-5290504fcd34.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=28b409b2-af73-45d8-b05f-5290504fcd34</wfw:commentRss>
      <title>Hi, My name is Kevin and I'm a VS.NET Addict</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,28b409b2-af73-45d8-b05f-5290504fcd34.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,28b409b2-af73-45d8-b05f-5290504fcd34.aspx</link>
      <pubDate>Wed, 08 Aug 2007 02:37:22 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;span style="FONT-SIZE: 13.5pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Hi,
   My name is Kevin and I'm a VS.NET Junky&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
   &lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;
   &lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;o:p&gt;
   &lt;font face=Calibri color=#000000 size=3&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Now
   what do I mean by that?&amp;nbsp; Well, I'm addicted to the Visual Studio .NET product
   line, I can't live without it, but it's starting to bring me down and I'm still looking
   for the high I got from using Visual Studio .NET 2003.&amp;nbsp; As with any humor what
   makes it funny is a small grain of truth.&amp;nbsp; I don't mean this to be negative,
   but sometimes you just need to rant.&amp;nbsp; Before I start with the negative, my mom
   always taught me to never say anything negative without positive comments first.&amp;nbsp;
   Boy is there a lot positive to say, this latest round of products from Microsoft fundamentally
   changed the way we developed web application, in such a positive way it's hard to
   put in to words.&amp;nbsp; I could go on for a long time on all the software I have in
   production right now that was written using Microsoft .NET technology.&amp;nbsp; When
   it comes down to it, us as developers aren't really here place judgment on our development
   tools, we are here to use the best tools out there to satisfy our customers’ needs
   and frankly there aren't any tools that compare.&lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&gt;
&lt;p&gt;
   &lt;img src="http://www.efficientcoder.net/content/binary/VS.NET.gif" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Now
   to the rant, well for the most part I have two main problems that are really starting
   to drive me nuts, first is performance and the second is VS.NET crashing.&amp;nbsp; Another
   side bar please, I've been in this industry since the early ninety’s and developing
   programs since the early eighties we've come a very long ways.&amp;nbsp; I remember a
   couple of multiyear long&amp;nbsp;projects I worked on in the mid to late nineties.&amp;nbsp;
   These were VC++ apps that literally to 30 to 45 minutes to compile each code-build-link-test
   cycle, some of us built some test harnesses to cut this down, but still it took 3
   to 5 minutes.&amp;nbsp;&amp;nbsp;As I continue my rant looking back at those projects really
   puts things in perspective.&amp;nbsp; 
   &lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;So
   what do I mean by performance issues, I have what I think is a fairy high-end developer
   machine, not like this &lt;a href="http://www.hanselman.com/blog/TheCodingHorrorUltimateDeveloperRigThrowdownPart2.aspx"&gt;monster
   machine&lt;/a&gt; that &lt;a href="http://www.hanselman.com/"&gt;&lt;font color=#0000ff&gt;Scott Hanselman&lt;/font&gt;&lt;/a&gt; put
   together (oh yes - I will have a quad core box sitting under my desk by the end of
   the summer) but a decent machine none the less, I have a Core 2 Duo running at 2.13GHz
   with 4GB ram and a decent SATA hard drive, I've also got a USB drive I'm using to
   leverage &lt;a href="http://www.microsoft.com/windows/products/windowsvista/features/details/readyboost.mspx"&gt;ReadyBoost&lt;/a&gt; on
   my Vista machine.&amp;nbsp; Here is a &lt;a href="http://www.efficientcoder.net/PermaLink,guid,4e6081dc-2afd-4b61-bf69-ebb08b99f3d6.aspx"&gt;link&lt;/a&gt; to
   a better description of my setup.&amp;nbsp; I'm currently working on a fairly large C#&amp;nbsp;solution
   with about 25&amp;nbsp;projects and 4 web applications.&amp;nbsp; The application was written
   so that the user interface is a collection of Custom Controls or more specifically
   WebParts so each time I&amp;nbsp;make updates I need to compile my control libraries or
   business objects libraries.&amp;nbsp; If my system has recently been rebooted I can usually
   do the edit-compile-test cycle in about 15-20 seconds, that includes the ASP.NET page
   recompiling with the new control library.&amp;nbsp; I have to admit, when you think about
   all the work it's doing, that is really incredible.&amp;nbsp; With this type of edit-compile-test
   cycle you can really achieve the state of flow as describe in the wonderful book &lt;a href="http://astore.amazon.com/betasoft08/detail/0932633439"&gt;PeopleWare&lt;/a&gt; productive
   projects and teams, a classic must read.&amp;nbsp; I have a terrible habit of working
   on too many things at once, I'm lucky, in that I can very quickly context switch however
   this generally results in a number of applications being open at one time on my computer.&amp;nbsp;
   After about 3-5 days of working on my Vista machine (for some crazy reason I installed
   Vista Ultimate, might that be part of the problem?) my compile times slowly start
   creeping up to where they are starting to approach 45-60 seconds.&amp;nbsp; In reality
   this just doesn't seem that long however it's just long enough to interrupt the "flow".&amp;nbsp;
   I think the thing that really makes my blood boil is when I'm watching the output
   pane in VS.NET and it says the compile completes, its 100% complete with zero errors,
   then, as I usually run my computer with task manager open, that little green bar sits
   at about 50%-75% VS.NET is non-responsive and I usually say something to my computer
   like..."That's OK, I'll just sit here and wait, no problem I don't have anything better
   to do...are you finished?...are you finished?"&amp;nbsp; (I get some strange looks from
   my better half, but I think she is getting used to it) then about 15-20 seconds later
   I can see if what I did actually worked.&amp;nbsp; Alright again only about 15-20 seconds
   but it certainly blows-the-flow.&amp;nbsp; That closes out the first part of my rant...in
   all reality, what VS.NET does is incredible, but the extra 30 seconds is just enough
   to let my mind wonder, check my emails, IM etc... (ding...maybe that's the real problem
   I have &lt;a href="http://en.wikipedia.org/wiki/Adult_attention-deficit_disorder"&gt;AADD&lt;/a&gt; and
   should look to fix my compile time issue with medications, trade one addition for
   another).&amp;nbsp; One thing that I try to do&amp;nbsp;to "keep-the-flow" going is with an
   excellent tool called &lt;a href="http://www.testdriven.net/"&gt;TestDriven.NET&lt;/a&gt; this
   get's my edit-compile-test time down to a matter of a few seconds when I'm working
   on my business logic, if you aren't using this why not?&amp;nbsp; In full disclaimer,
   I have &lt;a href="http://www.devexpress.com/Products/NET/IDETools/CodeRush"&gt;CodeRush&lt;/a&gt; and
   TestDriven.NET plug-ins installed, I don’t think they are the problem.&amp;nbsp; My prior
   machine was a 3.0GHz Pentium D&amp;nbsp;and 3GB RAM, I installed Vista Business and the
   VS2008 Beta 2 (not in a Virtual PC).&amp;nbsp; I don't plan on installing any other software
   on that machine and will see how it performs.&lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Rant
   number two...this one won't be nearly as long, about every 30-50th compile, as soon
   as I see that "Build Successful" message in my status bar, within a blink of eye Visual
   Studio disappears from my screen.&amp;nbsp; No error message no log entry...nothing, it's
   just gone.&amp;nbsp; I start it up and load my project (which takes between 2-3 minutes)
   and have never lost any work, but my solution settings (such as which files are open
   etc...) get lost.&amp;nbsp; Really a little annoying.&amp;nbsp; Whenever I get a free 4-5
   hours I'm going to repave the machine and only install VS.NET and the key tools necessary
   for doing development, this time I mean it for sure, really only my development apps.&lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;There,
   I got that off my chest after looking at the good the bad and the ugly, the reality
   of it for the size of our solutions and all the competing junk I have on my machine,
   I should be happy these compile in 5 minutes and I'm probably being greedy, but as
   with most developers I like to rant and complain.&lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Bottom
   line, thank you Microsoft for feeding my habit and providing me with a great (but
   not perfect) set of tools to write software to keep my clients happy and thus pay
   my bills, let’s see if we can do it a tad better in &lt;a href="http://msdn2.microsoft.com/en-us/vstudio/aa700830.aspx"&gt;Orcas&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;-ec&lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=28b409b2-af73-45d8-b05f-5290504fcd34" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,28b409b2-af73-45d8-b05f-5290504fcd34.aspx</comments>
      <category>ASP.NET;Software Engineering</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=455171ce-98b9-4782-8381-470dd7e97b48</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,455171ce-98b9-4782-8381-470dd7e97b48.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,455171ce-98b9-4782-8381-470dd7e97b48.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=455171ce-98b9-4782-8381-470dd7e97b48</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <h4>Exploring SharePoint 2007 with PowerShell
   </h4>
        <p>
      The more I work with SP2007, the more I get pumped about the technology.  Although
      there is a lot you can do right out-of-the-box, the programming model behind this
      really allows it to be a great framework for any development platform.
   </p>
        <p>
      To get started programming, you probably want to get an idea of how the Object Model
      works, a real simple way to do this is with PowerShell.  I have an SP2007 dev
      server I setup that I installed <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx">PowerShell</a> &amp; <a href="http://www.powershellide.com">PowerShell
      IDE </a>on.  Once you do that, just get a hold of the SP2007 SDK documentation,
      this will give you an idea of the structure of the Object Model then start playing! 
      The following screen shot should be enough to get you going:
   </p>
        <p>
          <img src="http://www.efficientcoder.net/content/binary/SHarePointPowerShell.png" border="0" />
        </p>
        <p>
      Obviously this same concept would work to exercise any object model!
   </p>
        <p>
      Enjoy!
   </p>
        <p>
      - ec
   </p>
        <p>
       
   </p>
        <img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=455171ce-98b9-4782-8381-470dd7e97b48" />
      </body>
      <title>Exploring SharePoint 2007 with PowerShell</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,455171ce-98b9-4782-8381-470dd7e97b48.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,455171ce-98b9-4782-8381-470dd7e97b48.aspx</link>
      <pubDate>Fri, 09 Feb 2007 15:44:00 GMT</pubDate>
      <description>&lt;h4&gt;Exploring SharePoint 2007 with PowerShell
&lt;/h4&gt;
&lt;p&gt;
   The more I work with SP2007, the more I get pumped about the technology.&amp;nbsp; Although
   there is a lot you can do right out-of-the-box, the programming model behind this
   really allows it to be a great framework for any development platform.
&lt;/p&gt;
&lt;p&gt;
   To get started programming, you probably want to get an idea of how the Object Model
   works, a real simple way to do this is with PowerShell.&amp;nbsp; I have an SP2007 dev
   server I setup that I installed &lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;PowerShell&lt;/a&gt; &amp;amp; &lt;a href="http://www.powershellide.com"&gt;PowerShell
   IDE &lt;/a&gt;on.&amp;nbsp; Once you do that, just get a hold of the SP2007 SDK documentation,
   this will&amp;nbsp;give you an idea of the structure of the Object Model then start playing!&amp;nbsp;
   The following screen shot should be enough to get you going:
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.efficientcoder.net/content/binary/SHarePointPowerShell.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   Obviously this same concept would work to exercise any object model!
&lt;/p&gt;
&lt;p&gt;
   Enjoy!
&lt;/p&gt;
&lt;p&gt;
   - ec
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=455171ce-98b9-4782-8381-470dd7e97b48" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,455171ce-98b9-4782-8381-470dd7e97b48.aspx</comments>
      <category>ASP.NET;PowerShell;SharePoint 2007</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=17d566aa-8dd5-4743-a54d-e66dff060dd8</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,17d566aa-8dd5-4743-a54d-e66dff060dd8.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,17d566aa-8dd5-4743-a54d-e66dff060dd8.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=17d566aa-8dd5-4743-a54d-e66dff060dd8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <h4>Custom WebParts in SharePoint 2007
   </h4>
        <p>
      Creating a custom WebPart in SharePoint 2007 isn't all that terribly difficult, just
      a few basic steps that may not be completely obvious...in addition if you want to
      deploy your WebPart on SP 2007 it may contain some additional resources such as gif's
      or java scripts.  Wouldn't it be nice if you could just deploy one assembly with
      everything you need?  Well that's possible so let's do that as well...
   </p>
        <ol>
          <li>
         To start out, just create a new VS.NET 2005 class library project and add a reference
         to "System.Web". 
      </li>
          <li>
         Go ahead and setup a reasonable sounding Assembly Name and Default NameSpace,
         these will be important when registering your component with Share Point 2007. 
      </li>
          <li>
         While your are changing your project settings, find the Signing Tab and make sure
         "Sign the assembly" is checked.  You will then need to go ahead and create a
         new KeyFile.  So far straight forward right? 
      </li>
          <li>
         Now let's add our web part, to do this simply add an class to your project. 
      </li>
          <li>
         The code in your web part should look something like <em>Not a example of good coding
         but that isn't the point </em>;-):</li>
        </ol>
        <font color="#0000ff" size="1">
          <p>
      using
   </p>
        </font>
        <font size="1">
          <font color="#000000"> System;<br /></font>
        </font>
        <font color="#0000ff" size="1">using</font>
        <font size="1">
          <font color="#000000"> System.Runtime.InteropServices;<br /></font>
        </font>
        <font color="#0000ff" size="1">using</font>
        <font size="1">
          <font color="#000000"> System.Web.UI;<br /></font>
        </font>
        <font color="#0000ff" size="1">using</font>
        <font size="1">
          <font color="#000000"> System.Web.UI.WebControls;<br /></font>
        </font>
        <font color="#0000ff" size="1">using</font>
        <font size="1">
          <font color="#000000"> System.Web.UI.WebControls.WebParts;<br /></font>
        </font>
        <font color="#0000ff" size="1">using</font>
        <font size="1">
          <font color="#000000"> System.Xml.Serialization;<br /></font>
        </font>
        <font color="#0000ff" size="1">using</font>
        <font size="1">
          <font color="#000000"> System.Reflection;<br /></font>
        </font>
        <font color="#0000ff" size="1">using</font>
        <font size="1">
          <font color="#000000"> System.Data;<br /></font>
        </font>
        <font color="#0000ff" size="1">using</font>
        <font size="1">
          <font color="#000000"> System.Data.SqlClient;<br /></font>
        </font>
        <font color="#0000ff" size="1">using</font>
        <font size="1">
          <font color="#000000"> System.ComponentModel;</font>
        </font>
        <font color="#0000ff" size="1">
          <p>
      namespace
   </p>
        </font>
        <font size="1">
          <font color="#000000"> SoftwareLogistics.SharePointTest<br /></font>{
   <p>
         [
   </p></font>
        <font color="#2b91af" size="1">Guid</font>
        <font size="1">(</font>
        <font color="#a31515" size="1">"72a24b71-f3a9-4fee-9272-4f3c27c87559"</font>
        <font size="1">)] <br />
      </font>
        <font color="#0000ff" size="1">public</font>
        <font size="1">
        </font>
        <font color="#0000ff" size="1">class</font>
        <font size="1">
        </font>
        <font color="#2b91af" size="1">SampleSP2007Part</font>
        <font size="1"> :
   System.Web.UI.WebControls.WebParts.</font>
        <font color="#2b91af" size="1">WebPart<br />
      </font>
        <font size="1">{<br />
         </font>
        <font size="1">System.Web.UI.WebControls.</font>
        <font color="#2b91af" size="1">DataGrid</font>
        <font size="1"> grdTime;<br /></font>
        <font color="#0000ff" size="1">
          <br />
         protected</font>
        <font size="1">
        </font>
        <font color="#0000ff" size="1">override</font>
        <font size="1">
        </font>
        <font color="#0000ff" size="1">void</font>
        <font size="1"> CreateChildControls()<br />
         {<br />
            </font>
        <font color="#2b91af" size="1">Image</font>
        <font size="1"> img
   = </font>
        <font color="#0000ff" size="1">new</font>
        <font size="1">
        </font>
        <font color="#2b91af" size="1">Image</font>
        <font size="1">();<br />
            </font>
        <font size="1">img.ImageUrl
   = Page.ClientScript.GetWebResourceUrl(</font>
        <font color="#0000ff" size="1">this</font>
        <font size="1">.GetType(), </font>
        <font color="#a31515" size="1">"SoftwareLogistics.SharePointTest.Images.Target.gif"</font>
        <font size="1">);
   <p>
               grdTime = 
   </p></font>
        <font color="#0000ff" size="1">new</font>
        <font size="1"> System.Web.UI.WebControls.</font>
        <font color="#2b91af" size="1">DataGrid</font>
        <font size="1">();<br />
            </font>
        <font color="#0000ff" size="1">string</font>
        <font size="1"> dsn
   = </font>
        <font color="#a31515" size="1">"server=??????;database=??????;user id=????;password=?????"</font>
        <font size="1">;<br /></font>
        <font size="1">
          <br />
            </font>
        <font color="#2b91af" size="1">SqlDataAdapter</font>
        <font size="1"> da
   = </font>
        <font color="#0000ff" size="1">new</font>
        <font size="1">
        </font>
        <font color="#2b91af" size="1">SqlDataAdapter</font>
        <font size="1">(</font>
        <font color="#a31515" size="1">"select
   top 5 * from usv_time_tracking order by start_date desc"</font>
        <font size="1">, </font>
        <font color="#0000ff" size="1">new</font>
        <font size="1">
        </font>
        <font color="#2b91af" size="1">SqlConnection</font>
        <font size="1">(dsn));<br />
            </font>
        <font color="#2b91af" size="1">DataTable</font>
        <font size="1"> tblTime
   = </font>
        <font color="#0000ff" size="1">new</font>
        <font size="1">
        </font>
        <font color="#2b91af" size="1">DataTable</font>
        <font size="1">(</font>
        <font color="#a31515" size="1">"My
   Time"</font>
        <font size="1">);</font>
        <p>
          <font size="1">         da.Fill(tblTime);<br />
               grdTime.DataSource = tblTime;<br />
               grdTime.DataBind();<br /></font>
          <font size="1">
            <br />
               Controls.Add(img);<br />
               Controls.Add(</font>
          <font color="#0000ff" size="1">new</font>
          <font size="1">
          </font>
          <font color="#2b91af" size="1">LiteralControl</font>
          <font size="1">(</font>
          <font color="#a31515" size="1">"&lt;br/&gt;"</font>
          <font size="1">));<br />
               Controls.Add(grdTime);
      </font>
        </p>
        <p>
          <font color="#0000ff" size="1">         base</font>
          <font size="1">.CreateChildControls();<br /></font>
          <font size="1">      }
      </font>
        </p>
        <p>
          <font color="#0000ff" size="1">      protected</font>
          <font size="1">
          </font>
          <font color="#0000ff" size="1">override</font>
          <font size="1">
          </font>
          <font color="#0000ff" size="1">void</font>
          <font size="1"> Render(</font>
          <font color="#2b91af" size="1">HtmlTextWriter</font>
          <font size="1"> writer)<br />
            {<br />
               writer.Write(</font>
          <font color="#a31515" size="1">"&lt;h4&gt;Hello
      World!&lt;/h4&gt;"</font>
          <font size="1">);<br />
               </font>
          <font color="#0000ff" size="1">base</font>
          <font size="1">.Render(writer);<br />
            }<br />
         }<br />
      }
      </font>
        </p>
        <p>
      Before installing this to SharePoint 2007, let's complete this section by talking
      about what we need to do to embed the resources with the assembly.
   </p>
        <ol>
          <li>
         Create an Image directory within your project and copy the Image there:<br /><img src="http://www.efficientcoder.net/content/binary/SLWebPartImageTree.bmp" border="0" /></li>
          <li>
         You can see that the name including the NameSpace is "SoftwareLogistics.SharePointTest.Images.Target.gif"
         (Case is important here) 
      </li>
          <li>
         Once you copied the image there you need to make sure you click on "Properties" and
         then set the Build Action to "Embedded Resource" for Target.gif, very important to
         do this... 
      </li>
          <li>
         Now open up your "AssemblyInfo.cs" file that is in the Properties folder of your project. 
         Add a line to it similar to 
         <br /><font size="1">[assembly: </font><font color="#2b91af" size="1">WebResource</font><font size="1">(</font><font color="#a31515" size="1">"SoftwareLogistics.SharePointTest.Images.Target.gif"</font><font size="1">,</font><font color="#a31515" size="1">"image/gif"</font><font size="1">)</font></li>
          <li>
            <p>
              <font size="1">
                <font size="2">You will also need to add <font color="#0000ff" size="1">using</font><font size="1"><font color="#000000"> System.Web.UI;</font></font> to
            the top of your AssemblyInfo.cs.</font>
              </font>
            </p>
          </li>
          <li>
            <p>
              <font size="1">
                <font size="2">Finally in the code you can set the url of the image
            as:<br /><font size="1">img.ImageUrl = Page.ClientScript.GetWebResourceUrl(<font color="#0000ff">this</font>.GetType(), <font color="#a31515">"SoftwareLogistics.SharePointTest.Images.Target.gif"</font>);</font></font>
              </font>
            </p>
          </li>
        </ol>
        <p>
          <font size="1">
            <font size="2">Now your assembly is ready to go all you need to do
      is turn that into and assembly and your are ready to incorporate it into your SharePoint
      2007 site, you can even us this as a WebPart or even a standard Server Control on
      any ASP.NET 2.0 site.</font>
          </font>
        </p>
        <p>
      To install the the component on the SharePoint2007 server you need to do the next
      couple of steps...
   </p>
        <ol>
          <li>
         First we need to get our component into the GAC so just drag it into the file pane
         for Windows\Assembly, you can see the my file here:<br /><img src="http://www.efficientcoder.net/content/binary/SLWebPartGAC.png" border="0" /></li>
          <li>
         Make a note of the Public Key Token, you will need that to register your part with
         SharePoint, you can also right mouse click on the assembly click on Properties
         and copy the Pulbic Key Token from there. 
      </li>
          <li>
         The final step to make it appear as a "potential" web part within SharePoint is to
         register the component in the Web.Config file.  So find Web.Config for the SharePoint
         instance you want this work with and open it in your favorite XML editor. 
      </li>
          <li>
         Find the section labeled "SafeControls" and add the following line (you can always
         just copy one of the existing lines and fill in your information.<br /><font face="Courier New"> &lt;SafeControl Assembly="SoftwareLogistics.SharePointTest,
         Version=1.1.0.0, Culture=neutral, PublicKeyToken=8220d66cd77f3b8d" Namespace="SoftwareLogistics.SharePointTest"
         TypeName="*" Safe="True" /&gt;</font></li>
        </ol>
        <p>
      At this point SharePoint knows about your WebPart, but you'll need to make it part
      of the Gallery so open up your SharePoint site and do these final steps
   </p>
        <ol>
          <li>
         Click on "Site Actions" and then "Site Settings" 
      </li>
          <li>
         Within the "Galleries" section click on "Web Parts" 
      </li>
          <li>
         Click on New, if all went well you should see the part you created within the list,
         if you don't see it there, go ahead and reset IIS. 
      </li>
          <li>
         Put a check mark next to your new web part and then click the "Populate Gallery" button.</li>
        </ol>
        <p>
      At this point your web part is ready to be included just like any other WebPart.
   </p>
        <p>
      Happy Coding!
   </p>
        <p>
      - ec
   </p>
        <img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=17d566aa-8dd5-4743-a54d-e66dff060dd8" />
      </body>
      <title>Custom WebParts in SharePoint 2007</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,17d566aa-8dd5-4743-a54d-e66dff060dd8.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,17d566aa-8dd5-4743-a54d-e66dff060dd8.aspx</link>
      <pubDate>Sun, 04 Feb 2007 18:32:43 GMT</pubDate>
      <description>&lt;h4&gt;Custom WebParts in SharePoint 2007
&lt;/h4&gt;
&lt;p&gt;
   Creating a custom WebPart in SharePoint 2007 isn't all that terribly difficult, just
   a few basic steps that may not be completely obvious...in addition if you want to
   deploy your WebPart on SP 2007 it may contain some additional resources such as gif's
   or java scripts.&amp;nbsp; Wouldn't it be nice if you could just deploy one assembly with
   everything you need?&amp;nbsp; Well that's possible so let's do that as well...
&lt;/p&gt;
&lt;ol&gt;
   &lt;li&gt;
      To start out, just create a new VS.NET 2005 class library project and add a reference
      to&amp;nbsp;"System.Web". 
   &lt;li&gt;
      Go ahead and setup a reasonable sounding Assembly Name and&amp;nbsp;Default NameSpace,
      these will be important when registering your component with Share Point 2007. 
   &lt;li&gt;
      While your are changing your project settings, find the Signing Tab and make sure
      "Sign the assembly" is checked.&amp;nbsp; You will then need to go ahead and create a
      new KeyFile.&amp;nbsp; So far straight forward right? 
   &lt;li&gt;
      Now let's add our web part, to do this simply add an class to your project. 
   &lt;li&gt;
      The code in your web part should look something like &lt;em&gt;Not a example of good coding
      but that isn't the point &lt;/em&gt;;-):&lt;/li&gt;
&lt;/ol&gt;
&lt;font color=#0000ff size=1&gt; 
&lt;p&gt;
   using
&lt;/font&gt;&lt;font size=1&gt;&lt;font color=#000000&gt; System;&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=1&gt;using&lt;/font&gt;&lt;font size=1&gt;&lt;font color=#000000&gt; System.Runtime.InteropServices;&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=1&gt;using&lt;/font&gt;&lt;font size=1&gt;&lt;font color=#000000&gt; System.Web.UI;&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=1&gt;using&lt;/font&gt;&lt;font size=1&gt;&lt;font color=#000000&gt; System.Web.UI.WebControls;&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=1&gt;using&lt;/font&gt;&lt;font size=1&gt;&lt;font color=#000000&gt; System.Web.UI.WebControls.WebParts;&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=1&gt;using&lt;/font&gt;&lt;font size=1&gt;&lt;font color=#000000&gt; System.Xml.Serialization;&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=1&gt;using&lt;/font&gt;&lt;font size=1&gt;&lt;font color=#000000&gt; System.Reflection;&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=1&gt;using&lt;/font&gt;&lt;font size=1&gt;&lt;font color=#000000&gt; System.Data;&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=1&gt;using&lt;/font&gt;&lt;font size=1&gt;&lt;font color=#000000&gt; System.Data.SqlClient;&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=1&gt;using&lt;/font&gt;&lt;font size=1&gt;&lt;font color=#000000&gt; System.ComponentModel;&lt;/font&gt;&gt;
&lt;/font&gt;&lt;font color=#0000ff size=1&gt; 
&lt;p&gt;
   namespace
&lt;/font&gt;&lt;font size=1&gt;&lt;font color=#000000&gt; SoftwareLogistics.SharePointTest&lt;br&gt;
&lt;/font&gt;{&gt;
&lt;p&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;[
&lt;/font&gt;&lt;font color=#2b91af size=1&gt;Guid&lt;/font&gt;&lt;font size=1&gt;(&lt;/font&gt;&lt;font color=#a31515 size=1&gt;"72a24b71-f3a9-4fee-9272-4f3c27c87559"&lt;/font&gt;&lt;font size=1&gt;)]&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color=#0000ff size=1&gt;public&lt;/font&gt;&lt;font size=1&gt; &lt;/font&gt;&lt;font color=#0000ff size=1&gt;class&lt;/font&gt;&lt;font size=1&gt; &lt;/font&gt;&lt;font color=#2b91af size=1&gt;SampleSP2007Part&lt;/font&gt;&lt;font size=1&gt; :
System.Web.UI.WebControls.WebParts.&lt;/font&gt;&lt;font color=#2b91af size=1&gt;WebPart&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font size=1&gt;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font size=1&gt;System.Web.UI.WebControls.&lt;/font&gt;&lt;font color=#2b91af size=1&gt;DataGrid&lt;/font&gt;&lt;font size=1&gt; grdTime;&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff size=1&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;protected&lt;/font&gt;&lt;font size=1&gt; &lt;/font&gt;&lt;font color=#0000ff size=1&gt;override&lt;/font&gt;&lt;font size=1&gt; &lt;/font&gt;&lt;font color=#0000ff size=1&gt;void&lt;/font&gt;&lt;font size=1&gt; CreateChildControls()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color=#2b91af size=1&gt;Image&lt;/font&gt;&lt;font size=1&gt; img
= &lt;/font&gt;&lt;font color=#0000ff size=1&gt;new&lt;/font&gt;&lt;font size=1&gt; &lt;/font&gt;&lt;font color=#2b91af size=1&gt;Image&lt;/font&gt;&lt;font size=1&gt;();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font size=1&gt;img.ImageUrl
= Page.ClientScript.GetWebResourceUrl(&lt;/font&gt;&lt;font color=#0000ff size=1&gt;this&lt;/font&gt;&lt;font size=1&gt;.GetType(), &lt;/font&gt;&lt;font color=#a31515 size=1&gt;"SoftwareLogistics.SharePointTest.Images.Target.gif"&lt;/font&gt;&lt;font size=1&gt;);&gt;
&lt;p&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grdTime = 
&lt;/font&gt;&lt;font color=#0000ff size=1&gt;new&lt;/font&gt;&lt;font size=1&gt; System.Web.UI.WebControls.&lt;/font&gt;&lt;font color=#2b91af size=1&gt;DataGrid&lt;/font&gt;&lt;font size=1&gt;();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color=#0000ff size=1&gt;string&lt;/font&gt;&lt;font size=1&gt; dsn
= &lt;/font&gt;&lt;font color=#a31515 size=1&gt;"server=??????;database=??????;user id=????;password=?????"&lt;/font&gt;&lt;font size=1&gt;;&lt;br&gt;
&lt;/font&gt;&lt;font size=1&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color=#2b91af size=1&gt;SqlDataAdapter&lt;/font&gt;&lt;font size=1&gt; da
= &lt;/font&gt;&lt;font color=#0000ff size=1&gt;new&lt;/font&gt;&lt;font size=1&gt; &lt;/font&gt;&lt;font color=#2b91af size=1&gt;SqlDataAdapter&lt;/font&gt;&lt;font size=1&gt;(&lt;/font&gt;&lt;font color=#a31515 size=1&gt;"select
top 5 * from usv_time_tracking order by start_date desc"&lt;/font&gt;&lt;font size=1&gt;, &lt;/font&gt;&lt;font color=#0000ff size=1&gt;new&lt;/font&gt;&lt;font size=1&gt; &lt;/font&gt;&lt;font color=#2b91af size=1&gt;SqlConnection&lt;/font&gt;&lt;font size=1&gt;(dsn));&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color=#2b91af size=1&gt;DataTable&lt;/font&gt;&lt;font size=1&gt; tblTime
= &lt;/font&gt;&lt;font color=#0000ff size=1&gt;new&lt;/font&gt;&lt;font size=1&gt; &lt;/font&gt;&lt;font color=#2b91af size=1&gt;DataTable&lt;/font&gt;&lt;font size=1&gt;(&lt;/font&gt;&lt;font color=#a31515 size=1&gt;"My
Time"&lt;/font&gt;&lt;font size=1&gt;);&lt;/font&gt;&gt;
&lt;p&gt;
   &lt;font size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;da.Fill(tblTime);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grdTime.DataSource = tblTime;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grdTime.DataBind();&lt;br&gt;
   &lt;/font&gt;&lt;font size=1&gt;
   &lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Controls.Add(img);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Controls.Add(&lt;/font&gt;&lt;font color=#0000ff size=1&gt;new&lt;/font&gt;&lt;font size=1&gt; &lt;/font&gt;&lt;font color=#2b91af size=1&gt;LiteralControl&lt;/font&gt;&lt;font size=1&gt;(&lt;/font&gt;&lt;font color=#a31515 size=1&gt;"&amp;lt;br/&amp;gt;"&lt;/font&gt;&lt;font size=1&gt;));&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Controls.Add(grdTime);
&lt;/p&gt;
&lt;p&gt;
   &gt;&lt;font color=#0000ff size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;base&lt;/font&gt;&lt;font size=1&gt;.CreateChildControls();&lt;br&gt;
   &lt;/font&gt;&lt;font size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&lt;/p&gt;
&lt;p&gt;
   &gt;&lt;font color=#0000ff size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;protected&lt;/font&gt;&lt;font size=1&gt; &lt;/font&gt;&lt;font color=#0000ff size=1&gt;override&lt;/font&gt;&lt;font size=1&gt; &lt;/font&gt;&lt;font color=#0000ff size=1&gt;void&lt;/font&gt;&lt;font size=1&gt; Render(&lt;/font&gt;&lt;font color=#2b91af size=1&gt;HtmlTextWriter&lt;/font&gt;&lt;font size=1&gt; writer)&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;writer.Write(&lt;/font&gt;&lt;font color=#a31515 size=1&gt;"&amp;lt;h4&amp;gt;Hello
   World!&amp;lt;/h4&amp;gt;"&lt;/font&gt;&lt;font size=1&gt;);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color=#0000ff size=1&gt;base&lt;/font&gt;&lt;font size=1&gt;.Render(writer);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
   }
&lt;/p&gt;
&gt; 
&lt;p&gt;
   Before installing this to SharePoint 2007, let's complete this section by talking
   about what we need to do to embed the resources with the assembly.
&lt;/p&gt;
&lt;ol&gt;
   &lt;li&gt;
      Create an&amp;nbsp;Image directory within your project and copy the Image there:&lt;br&gt;
      &lt;img src="http://www.efficientcoder.net/content/binary/SLWebPartImageTree.bmp" border=0&gt; 
   &lt;li&gt;
      You can see that the name including the NameSpace is "SoftwareLogistics.SharePointTest.Images.Target.gif"
      (Case is important here) 
   &lt;li&gt;
      Once you copied the image there you need to make sure you click on "Properties" and
      then set the Build Action to "Embedded Resource" for Target.gif, very important to
      do this... 
   &lt;li&gt;
      Now open up your "AssemblyInfo.cs" file that is in the Properties folder of your project.&amp;nbsp;
      Add a line to it similar to 
      &lt;br&gt;
      &lt;font size=1&gt;[assembly: &lt;/font&gt;&lt;font color=#2b91af size=1&gt;WebResource&lt;/font&gt;&lt;font size=1&gt;(&lt;/font&gt;&lt;font color=#a31515 size=1&gt;"SoftwareLogistics.SharePointTest.Images.Target.gif"&lt;/font&gt;&lt;font size=1&gt;,&lt;/font&gt;&lt;font color=#a31515 size=1&gt;"image/gif"&lt;/font&gt;&lt;font size=1&gt;)&lt;/font&gt; 
   &lt;li&gt;
      &lt;p&gt;
         &lt;font size=1&gt;&lt;font size=2&gt;You will also need to add &lt;font color=#0000ff size=1&gt;using&lt;/font&gt;&lt;font size=1&gt;&lt;font color=#000000&gt; System.Web.UI;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;to
         the top of your AssemblyInfo.cs.&lt;/font&gt;&lt;/font&gt;
      &lt;/p&gt;
   &lt;li&gt;
      &lt;p&gt;
         &lt;font size=1&gt;&lt;font size=2&gt;Finally in the code you can set the url of the image as:&lt;br&gt;
         &lt;font size=1&gt;img.ImageUrl = Page.ClientScript.GetWebResourceUrl(&lt;font color=#0000ff&gt;this&lt;/font&gt;.GetType(), &lt;font color=#a31515&gt;"SoftwareLogistics.SharePointTest.Images.Target.gif"&lt;/font&gt;);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
      &lt;/p&gt;
   &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
   &lt;font size=1&gt;&lt;font size=2&gt;Now your assembly is ready to go all you need to do is turn
   that into and assembly and your are ready to incorporate it into your SharePoint 2007
   site, you can even us this as a WebPart or even a standard Server Control on any ASP.NET
   2.0 site.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   To install the the component on the SharePoint2007 server you need to do the next
   couple of steps...
&lt;/p&gt;
&lt;ol&gt;
   &lt;li&gt;
      First we need to get our component into the GAC so just drag it into the file pane
      for Windows\Assembly, you can see the my file here:&lt;br&gt;
      &lt;img src="http://www.efficientcoder.net/content/binary/SLWebPartGAC.png" border=0&gt; 
   &lt;li&gt;
      Make a note of the Public Key Token, you will need that to register your part with
      SharePoint, you can also right mouse click&amp;nbsp;on the assembly click on Properties
      and copy the Pulbic Key Token from there. 
   &lt;li&gt;
      The final step to make it appear as a "potential" web part within SharePoint is to
      register the component in the Web.Config file.&amp;nbsp; So find Web.Config for the SharePoint
      instance you want this work with and open it in your favorite XML editor. 
   &lt;li&gt;
      Find the section labeled "SafeControls" and add the following line (you can always
      just copy one of the existing lines and&amp;nbsp;fill in your information.&lt;br&gt;
      &lt;font face="Courier New"&gt;&amp;nbsp;&amp;lt;SafeControl Assembly="SoftwareLogistics.SharePointTest,
      Version=1.1.0.0, Culture=neutral, PublicKeyToken=8220d66cd77f3b8d" Namespace="SoftwareLogistics.SharePointTest"
      TypeName="*" Safe="True" /&amp;gt;&lt;/font&gt;
   &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
   At this point SharePoint knows about your WebPart, but you'll need to make it part
   of the Gallery so open up your SharePoint site and do these final steps
&lt;/p&gt;
&lt;ol&gt;
   &lt;li&gt;
      Click on "Site Actions" and then "Site Settings" 
   &lt;li&gt;
      Within the "Galleries" section click on "Web Parts" 
   &lt;li&gt;
      Click on New, if all went well you should see the part you created within the list,
      if you don't see it there, go ahead and reset IIS. 
   &lt;li&gt;
      Put a check mark next to your new web part and then click the "Populate Gallery" button.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
   At this point your web part is ready to be included just like any other WebPart.
&lt;/p&gt;
&lt;p&gt;
   Happy Coding!
&lt;/p&gt;
&lt;p&gt;
   - ec
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=17d566aa-8dd5-4743-a54d-e66dff060dd8" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,17d566aa-8dd5-4743-a54d-e66dff060dd8.aspx</comments>
      <category>ASP.NET;SharePoint 2007;Software Engineering</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=1a7e824e-d599-45da-854b-909ce99a5bdf</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,1a7e824e-d599-45da-854b-909ce99a5bdf.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,1a7e824e-d599-45da-854b-909ce99a5bdf.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=1a7e824e-d599-45da-854b-909ce99a5bdf</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <h4>SharePoint 2007 - It's finally all coming together!
   </h4>
        <p>
      I remember in the very early days of .NET they had a cool demo of how to build
      a portal in ASP.NET, this was called "I Buy Spy" from what I understood
      went on to be <a href="http://www.dotnetnuke.com">DOTNETNUKE</a>, I was excited
      about the concept of configurable content within the portal, it had all the right
      concepts, adding tabs, little widgets you could configure etc... These were really
      just Web Controls (ASCX) or Server Controls (compiled DLL's).  My third version
      of "The Chaos Filter" used this concept extensively. 
   </p>
        <p>
      Then with ASP.NET 2.0, they introduced the concept of WebParts, this was nice however
      you had to build up a set of scaffolding and use the provider model to use these
      within your site (at least as pure web parts).  Not terribly difficult but it
      limited your deployed options.  At the time SharePoint 2003 had something called
      "WebParts" as well, extremely similar in both appearance and function, however these
      "WebParts" were not the same thing as those created with ASP.NET 2.0.  Very disappointing
      (and confusing), SharePoint 2003 web parts actually came out first, and I assume that
      Microsoft kept the name since it seems to fit this concept so well and the intent
      with ASP.NET 2.0 web parts was that they would work with SharePoint 2007.
   </p>
        <p>
      Version 3.0 of the product really defined and flushed out the data model and workflow
      engine however, I just wasn't very happy with the presentation layer in ASP.NET 1.1
      using the ASCX's and custom controls.  With the introduction of the ASP.NET 2.0
      I started on version 4.0 of "The Chaos Filter", this time I focused on an architecture
      that was built from the ground-up to use web parts and leverage the existing data
      model and workflow concepts that make the Chaos Filter unique.  This architecture
      relied heavily on code generation from a product called CodeSmith, templates where
      created to not only create a simple DAL that mapped to tables in the database, but
      it also created two web parts (master/detail) for each tables.  This obviously
      doesn't mean that you can generate 100% of the application, however it does mean that
      it can very rapidly give you web parts that work out-of-the box that you can customize. 
      Anytime I hear "You can build your hole site in just three lines of code" my spider
      senses tell me to watch out!  This solution is really intended to put in place
      the framework and plumbing that you can open up in your development environment and
      make it do something useful.
   </p>
        <p>
      So here we are, SharePoint 2007 was released last November, what does this give us
      that we really didn't have before?  We now have the ability to easily create
      little "chunks" of functionality in the form of "WebParts" that can be wired up to
      create applications.  So with the data model defined in V3.0 of my product, the
      architecture to include code generation defined in V4.0 of my product, and a mature
      framework in SharePoint 2007, it's time to start figuring out how to package these
      concepts into something that will provide value.
   </p>
        <p>
      -ec
   </p>
        <img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=1a7e824e-d599-45da-854b-909ce99a5bdf" />
      </body>
      <title>SharePoint 2007 &amp; The Chaos Filter</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,1a7e824e-d599-45da-854b-909ce99a5bdf.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,1a7e824e-d599-45da-854b-909ce99a5bdf.aspx</link>
      <pubDate>Sun, 04 Feb 2007 15:05:56 GMT</pubDate>
      <description>&lt;h4&gt;SharePoint 2007 - It's finally all coming together!
&lt;/h4&gt;
&lt;p&gt;
   I remember in the very&amp;nbsp;early days of .NET they had a cool demo of how to build
   a portal in&amp;nbsp;ASP.NET, this was&amp;nbsp;called "I Buy Spy" from what I understood
   went on to be &lt;a href="http://www.dotnetnuke.com"&gt;DOTNETNUKE&lt;/a&gt;,&amp;nbsp;I was&amp;nbsp;excited
   about the concept of configurable content within the portal, it had all the right
   concepts, adding tabs, little widgets you could configure etc...&amp;nbsp;These were really
   just Web Controls (ASCX) or Server Controls (compiled DLL's).&amp;nbsp; My third version
   of "The Chaos Filter" used this concept extensively.&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   Then with ASP.NET 2.0, they introduced the concept of WebParts, this was nice however
   you had to build up a set of scaffolding and use the provider model to&amp;nbsp;use these
   within your site (at least as pure web parts).&amp;nbsp; Not terribly difficult but it
   limited your deployed options.&amp;nbsp; At the time SharePoint 2003 had something called
   "WebParts" as well, extremely similar in both appearance and function, however these
   "WebParts" were not the same thing as those created with ASP.NET 2.0.&amp;nbsp; Very disappointing
   (and confusing), SharePoint 2003 web parts actually came out first, and I assume that
   Microsoft kept the name since it seems to fit this concept so well and the intent
   with ASP.NET 2.0 web parts was that they would work with SharePoint 2007.
&lt;/p&gt;
&lt;p&gt;
   Version 3.0 of the product really defined and flushed out the data model and workflow
   engine however, I just wasn't very happy with the presentation layer in ASP.NET 1.1
   using the ASCX's and custom controls.&amp;nbsp; With the introduction of the ASP.NET 2.0
   I started on version 4.0 of "The Chaos Filter", this time I focused on&amp;nbsp;an architecture
   that was built from the ground-up to use web parts and leverage the existing data
   model and workflow concepts that make the Chaos Filter unique.&amp;nbsp; This architecture
   relied heavily on code generation from a product called CodeSmith, templates where
   created to not only create a simple DAL that mapped to tables in the database, but
   it also created two web parts (master/detail)&amp;nbsp;for each tables.&amp;nbsp; This obviously
   doesn't mean that you can generate 100% of the application, however it does mean that
   it can very rapidly give you web parts that work out-of-the box that you can customize.&amp;nbsp;
   Anytime I hear "You can build your hole site in just three lines of code" my spider
   senses tell me to watch out!&amp;nbsp; This solution is really intended to put in place
   the framework and plumbing that you can open up in your development environment and
   make it do something useful.
&lt;/p&gt;
&lt;p&gt;
   So here we are, SharePoint 2007 was released last November, what does this give us
   that we really didn't have before?&amp;nbsp; We now have the ability to easily create
   little "chunks" of functionality in the form of "WebParts" that can be wired up to
   create applications.&amp;nbsp; So with the data model defined in V3.0 of my product, the
   architecture to include code generation defined in V4.0 of my product, and a mature
   framework in SharePoint 2007, it's time to start figuring out how to package these
   concepts into something that will provide value.
&lt;/p&gt;
&lt;p&gt;
   -ec
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=1a7e824e-d599-45da-854b-909ce99a5bdf" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,1a7e824e-d599-45da-854b-909ce99a5bdf.aspx</comments>
      <category>ASP.NET;Chaos Filter;SharePoint 2007;Software Engineering</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=21975130-b739-4981-83d3-619a3d413923</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,21975130-b739-4981-83d3-619a3d413923.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,21975130-b739-4981-83d3-619a3d413923.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=21975130-b739-4981-83d3-619a3d413923</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <h4>ASP.NET Under Vista
   </h4>
        <p>
      Vista is deployed with IIS 7.0 a cool feature that wasn't available on XP is the ability
      to create multiple web sites.  This means you can can configure IIS to look at
      the host name and map that to a particular web site...I explain...
   </p>
        <p>
      First find and open your hosts file, this is in in \Windows\System32\Drivers\Etc add
      a couple of entries that point back at your local machine (127.0.0.1) 
      <br /><img src="http://www.efficientcoder.net/content/binary/hosts.jpg" border="0" /></p>
        <p>
      Next open up IIS and create a new web site, in the Host header section enter the name
      of "virtual host" you entered in your hosts file (also don't forget to set your app
      pool up to use the "Classic ASP.NET" pipe line mode)
   </p>
        <p>
          <img src="http://www.efficientcoder.net/content/binary/IIS701.jpg" border="0" />
        </p>
        <p>
      Now you can browse to the site you are developing with just <a href="http://plinks">http://plinks</a> instead
      of <a href="http://localhost/plinks">http://localhost/plinks</a></p>
        <p>
          <img src="http://www.efficientcoder.net/content/binary/Browser.jpg" border="0" />
        </p>
        <p>
      Although this seems like a fairly small deal, if you are working on multiple projects
      it's nice to keep things organized a little better not to mention a few less key strokes
      bringing up the page.
   </p>
        <p>
      -ec
   </p>
        <img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=21975130-b739-4981-83d3-619a3d413923" />
      </body>
      <title>ASP.NET Under Vista</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,21975130-b739-4981-83d3-619a3d413923.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,21975130-b739-4981-83d3-619a3d413923.aspx</link>
      <pubDate>Tue, 28 Nov 2006 01:03:13 GMT</pubDate>
      <description>&lt;h4&gt;ASP.NET Under Vista
&lt;/h4&gt;
&lt;p&gt;
   Vista is deployed with IIS 7.0 a cool feature that wasn't available on XP is the ability
   to create multiple web sites.&amp;nbsp; This means you can can configure IIS to look at
   the host name and map that to a particular web site...I explain...
&lt;/p&gt;
&lt;p&gt;
   First find and open your hosts file, this is in in \Windows\System32\Drivers\Etc add
   a couple of entries that point back at your local machine (127.0.0.1) 
   &lt;br&gt;
   &lt;img src="http://www.efficientcoder.net/content/binary/hosts.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   Next open up IIS and create a new web site, in the Host header section enter the name
   of "virtual host" you entered in your hosts file (also don't forget to set your app
   pool up to use the "Classic ASP.NET" pipe line mode)
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.efficientcoder.net/content/binary/IIS701.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   Now you can browse to the site you are developing with just &lt;a href="http://plinks"&gt;http://plinks&lt;/a&gt; instead
   of &lt;a href="http://localhost/plinks"&gt;http://localhost/plinks&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.efficientcoder.net/content/binary/Browser.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   Although this seems like a fairly small deal, if you are working on multiple projects
   it's nice to keep things organized a little better not to mention a few less key strokes
   bringing up the page.
&lt;/p&gt;
&lt;p&gt;
   -ec
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=21975130-b739-4981-83d3-619a3d413923" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,21975130-b739-4981-83d3-619a3d413923.aspx</comments>
      <category>ASP.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=62eac813-3ad1-4c9e-aa15-b25ed41bf000</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,62eac813-3ad1-4c9e-aa15-b25ed41bf000.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,62eac813-3ad1-4c9e-aa15-b25ed41bf000.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=62eac813-3ad1-4c9e-aa15-b25ed41bf000</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="4">
            <strong>Web Resources in a Different Assembly</strong>
          </font>
        </p>
        <p>
      A really cool feature in ASP.NET 2.0 is the ability to embed resources such as images,
      css and js files within your compiled source, just like you can in a Windows application.
   </p>
        <p>
      I have a pet project I've been working on for a number of years, it's something that
      when the time is right I want to try to market.  For now it's a good place to
      "play" with the new technology so I can be effective when I implement it for my clients.
   </p>
        <p>
      Embedding resources within an assembly makes considerable sense for creating an easy
      to install deployment package.  Within a short amount of time I was able to follow
      the sample code within this <a href="http://support.microsoft.com/kb/910442/en-us?spid=8940&amp;sid=global">sample</a>.
   </p>
        <table>
          <tbody>
            <tr>
              <td>
                <p>
                  <font size="2">What I really wanted was the ability to place my resource files into
                  a seperate assembly to facilitate having different images for different deployments. 
                  For some reason if I put the image in the same assembly as the Custom Control that
                  displayed it, everything worked fine.  As soon as I moved the image into it's
                  own assembly, I get that lovely red x showing that the resource could not be found
                  on the server.</font>
                </p>
              </td>
              <td>
                <p>
                  <img alt="" hspace="0" src="http://www.efficientcoder.net/content/binary/RedX.png" border="0" />
                </p>
              </td>
            </tr>
          </tbody>
        </table>
        <p>
      To solve this problem, I simply created a new class within my resource assembly and
      in then in my call to "GetWebResourceUrl" instead of passing the type of calling
      object I passed in a type within resource assembly.
   </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">node.Image <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Page.ClientScript.GetWebResourceUrl(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">typeof</span>(ChaosFilter.Images.Stub), <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ChaosFilter.Images.Tree.Add.gif"</span>);</span>
        </p>
        <p>
       Once I did that I got the image as I expected it.  
   </p>
        <p>
       <img alt="" hspace="0" src="http://www.efficientcoder.net/content/binary/Good.png" align="baseline" border="0" /></p>
        <p>
      So here is my simple resource assembly that could be used to swap out the images,
      it just needs the simple class ChaosFilter.Images.Stub and life is good
   </p>
        <p>
          <img src="http://www.efficientcoder.net/content/binary/ProjectTree.png" border="0" />
        </p>
        <p>
      - ec
   </p>
        <img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=62eac813-3ad1-4c9e-aa15-b25ed41bf000" />
      </body>
      <title>Web Resources in a Different Assembly</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,62eac813-3ad1-4c9e-aa15-b25ed41bf000.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,62eac813-3ad1-4c9e-aa15-b25ed41bf000.aspx</link>
      <pubDate>Sat, 26 Aug 2006 01:27:09 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;font size=4&gt;&lt;strong&gt;Web Resources in a Different Assembly&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   A really cool feature in ASP.NET 2.0 is the ability to embed resources such as images,
   css and js files within your compiled source, just like you can in a Windows application.
&lt;/p&gt;
&lt;p&gt;
   I have a pet project I've been working on for a number of years, it's something that
   when the time is right I want to try to market.&amp;nbsp; For now it's a good place to
   "play" with the new technology so I can be effective when I implement it for my clients.
&lt;/p&gt;
&lt;p&gt;
   Embedding resources within an assembly makes considerable sense for creating an easy
   to install deployment package.&amp;nbsp; Within a short amount of time I was able to follow
   the sample code within this &lt;a href="http://support.microsoft.com/kb/910442/en-us?spid=8940&amp;amp;sid=global"&gt;sample&lt;/a&gt;.
&lt;/p&gt;
&lt;table&gt;
   &lt;tbody&gt;
      &lt;tr&gt;
         &lt;td&gt;
            &lt;p&gt;
               &lt;font size=2&gt;What I really wanted was the ability to place my resource files into
               a seperate assembly to facilitate having different images for different deployments.&amp;nbsp;
               For some reason if I put the image in the same assembly as the Custom Control that
               displayed it, everything worked fine.&amp;nbsp; As soon as I moved the image into it's
               own assembly, I get that lovely red x showing that the resource could not be found
               on the server.&lt;/font&gt;
            &lt;/p&gt;
         &lt;/td&gt;
         &lt;td&gt;
            &lt;p&gt;
               &lt;img alt="" hspace=0 src="http://www.efficientcoder.net/content/binary/RedX.png" border=0&gt;
            &lt;/p&gt;
         &lt;/td&gt;
      &lt;/tr&gt;
   &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
   To solve this problem, I simply created a new class within my resource assembly and
   in then in my call to&amp;nbsp;"GetWebResourceUrl" instead of&amp;nbsp;passing the type of&amp;nbsp;calling
   object I passed in a type within resource assembly.
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;node.Image &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Page.ClientScript.GetWebResourceUrl(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;typeof&lt;/span&gt;(ChaosFilter.Images.Stub), &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"ChaosFilter.Images.Tree.Add.gif"&lt;/span&gt;);&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;Once I did that I got the image as I expected it.&amp;nbsp;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;&lt;img alt="" hspace=0 src="http://www.efficientcoder.net/content/binary/Good.png" align=baseline border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   So here is my simple resource assembly that could be used to swap out the images,
   it just needs the simple class ChaosFilter.Images.Stub and life is good
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.efficientcoder.net/content/binary/ProjectTree.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   - ec
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=62eac813-3ad1-4c9e-aa15-b25ed41bf000" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,62eac813-3ad1-4c9e-aa15-b25ed41bf000.aspx</comments>
      <category>ASP.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=cb1ce8fe-fd74-40c1-aa48-8d2611cdfadd</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,cb1ce8fe-fd74-40c1-aa48-8d2611cdfadd.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,cb1ce8fe-fd74-40c1-aa48-8d2611cdfadd.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=cb1ce8fe-fd74-40c1-aa48-8d2611cdfadd</wfw:commentRss>
      <title>ASP.NET 2.0 SiteMap Role Provider Challenges</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,cb1ce8fe-fd74-40c1-aa48-8d2611cdfadd.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,cb1ce8fe-fd74-40c1-aa48-8d2611cdfadd.aspx</link>
      <pubDate>Wed, 14 Jun 2006 12:48:39 GMT</pubDate>
      <description>&lt;div class=Section1&gt;
   &lt;p class=MsoNormal&gt;
      &lt;b&gt;&lt;font face=Arial size=4&gt;&lt;span style="FONT-WEIGHT: bold; FONT-SIZE: 14pt; FONT-FAMILY: Arial"&gt;&lt;?xml:namespace prefix = o /&gt;ASP.NET
      2.0 Menu Control Limitations&lt;o:p&gt;&lt;/o:p&gt;
      &lt;/span&gt;&lt;/font&gt;&lt;/b&gt;
   &lt;/p&gt;
   &lt;p class=MsoNormal&gt;
      &lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;
      &lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;
      &lt;/span&gt;&lt;/font&gt;&lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Currently
      in one of my projects we decided to move from a custom tab/menu navigation scheme
      to one that exclusively uses the ASP.NET 2.0 Menu Navigation control.&amp;nbsp; At first
      I thought, no big deal, we wrote custom providers for membership, roles and a site
      map.&amp;nbsp; These were slightly more complex due to the fact that we are using this
      with the concepts of a portal.&amp;nbsp; A user can belong to different portals, they
      may have different roles within each portal and each portal may have a unique site
      map.&lt;o:p&gt;&lt;/o:p&gt;
      &lt;/span&gt;&lt;/font&gt;
   &lt;/p&gt;
   &lt;p class=MsoNormal&gt;
      &lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;
      &lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;
      &lt;/span&gt;&lt;/font&gt;&lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;This
      worked extremely well using only the core features of the provider model, however
      when we wanted to use the actual ASP.NET Menu Navigation control (which is actually
      quite good) we found that for our needs on this project it was too tightly coupled&amp;nbsp;to
      FormsAuthentication model within ASP.NET 2.0.&lt;o:p&gt;&lt;/o:p&gt;
      &lt;/span&gt;&lt;/font&gt;
   &lt;/p&gt;
   &lt;p class=MsoNormal&gt;
      &lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;
      &lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;
      &lt;/span&gt;&lt;/font&gt;&lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;What
      we wanted was to secure access to the site via the site map file as well as use this
      to build menus that only reflect what the user has access to.&amp;nbsp; The ASP.NET Menu
      Navigation control only uses the SiteMap file to show/hide menu items within the tree.&amp;nbsp;
      In addition other than at the top node, showing/hiding menu nodes is controlled by
      the authorization sections of the web.config file.&amp;nbsp; That is to say unless you
      use the authorization seconds within the web.config file, the roles attributes within
      the SiteMap are ignored.&amp;nbsp; Since our application wants to control access to pages
      within the SiteMap so we can have multiple site maps per web site, this solution didn’t
      work for us.&amp;nbsp; In addition our site map is not exclusively mapped to pages within
      our system.&amp;nbsp; It is possible for our site map to actually call a feature within
      the page.&amp;nbsp; If we want to lock down specific actions in the page, but not the
      complete page this will become a problem.&lt;o:p&gt;&lt;/o:p&gt;
      &lt;/span&gt;&lt;/font&gt;
   &lt;/p&gt;
   &lt;p class=MsoNormal&gt;
      &lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;
      &lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;
      &lt;/span&gt;&lt;/font&gt;&lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Our
      solution will be to not use the built in method of binding roles to menu nodes from
      the SiteMap control to the roles for the current users that is built in to the ASP.NET
      Menu Navigation control built from our custom site map provider, but modify our site
      map provider to build up the menu control each time it’s needed for each user based
      upon their roles.&amp;nbsp; The problem with this is that we take a performance hit.&lt;o:p&gt;&lt;/o:p&gt;
      &lt;/span&gt;&lt;/font&gt;
   &lt;/p&gt;
   &lt;p class=MsoNormal&gt;
      &lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;
      &lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;
      &lt;/span&gt;&lt;/font&gt;&lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;One
      possible solution (not possible within the scope of the current project) would be
      to inherit from the ASP.NET 2.0 Menu Control and provide additional behavior to exclusively
      use the roles from the SiteMap file.&lt;o:p&gt;&lt;/o:p&gt;
      &lt;/span&gt;&lt;/font&gt;
   &lt;/p&gt;
   &lt;p class=MsoNormal&gt;
      &lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;
      &lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;
      &lt;/span&gt;&lt;/font&gt;&lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Obviously
      that part of the solution that is not discussed was to make sure that when a user
      attempts to perform an action on a page from the menu control, it is authorized since
      it may be possible for the user to enter a URL without clicking on a menu control.
      &amp;nbsp;This would be &amp;nbsp;normally handled by the authorization section within the
      web.config file, our approach is to do a lookup within the site map file to detect
      unauthorized actions.&lt;/span&gt;&lt;/font&gt;
   &lt;/p&gt;
   &lt;p class=MsoNormal&gt;
      &lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;
   &lt;/p&gt;
   &lt;p class=MsoNormal&gt;
      &lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;FOLLOWUP
      2/4/2007 - Since a considerable number of the users of the site are using Safari on
      a Mac, we need to replace the ASP.NET 2.0 Menu Control we used a JavaScript menu strategy
      instead.&lt;/span&gt;&lt;/font&gt;
   &lt;/p&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=cb1ce8fe-fd74-40c1-aa48-8d2611cdfadd" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,cb1ce8fe-fd74-40c1-aa48-8d2611cdfadd.aspx</comments>
      <category>ASP.NET</category>
    </item>
  </channel>
</rss>