<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>The Sprage Page!</title>
  <link rel="alternate" type="text/html" href="http://thesprage.com/DasBlog/" />
  <link rel="self" href="http://thesprage.com/DasBlog/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2009-05-21T11:37:09.1198273-07:00</updated>
  <author>
    <name>Aaron Sprague</name>
  </author>
  <subtitle>My Quest for Knowledge</subtitle>
  <id>http://thesprage.com/DasBlog/</id>
  <generator uri="http://www.dasblog.net" version="2.0.7180.0">DasBlog</generator>
  <entry>
    <title>Safer Deletes and Updates on Live DataBase</title>
    <link rel="alternate" type="text/html" href="http://TheSprage.com/DasBlog/2009/05/21/SaferDeletesAndUpdatesOnLiveDataBase.aspx" />
    <id>http://thesprage.com/DasBlog/PermaLink,guid,16925099-bd8b-4885-bc8b-52b4d5507bcf.aspx</id>
    <published>2009-05-21T10:29:45.895-07:00</published>
    <updated>2009-05-21T11:37:09.1198273-07:00</updated>
    <category term="Education" label="Education" scheme="http://thesprage.com/DasBlog/CategoryView,category,Education.aspx" />
    <category term="SQL" label="SQL" scheme="http://thesprage.com/DasBlog/CategoryView,category,SQL.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font face="Arial">Its always scary working with live data I found that I feel more
confident when I take the following measures.</font>
        </p>
        <p>
          <span class="Arial" fnotmisspelledcache="true">
            <font face="Arial">Do a Select first
to check the where clause:</font>
          </span>
        </p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span> * <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> Foo <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span> FooID
= 1000</span>
        </pre>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <font face="Arial" size="2">Wrap
your changes in a Transaction and roll it back if you did not get the expected result.</font>
          </span>
        </p>
        <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
              <pre>
                <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                  <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Begin</span>
                  <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Transaction</span>
                  <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DELETE</span>
                  <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> Foo <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span> FooID
= 1000 <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">IF</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">@@RowCount</span> &lt;&gt;
1 <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BEGIN</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Rollback</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Transaction</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">END</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ELSE</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Commit</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Transaction</span></span>
              </pre>
            </span>
          </pre>
          <p>
          </p>
        </span>
        <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> 
</span>
        <img width="0" height="0" src="http://thesprage.com/DasBlog/aggbug.ashx?id=16925099-bd8b-4885-bc8b-52b4d5507bcf" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Visual Studio Throws an Error When Trying to Connect/Open an .mdf File</title>
    <link rel="alternate" type="text/html" href="http://TheSprage.com/DasBlog/2009/04/11/VisualStudioThrowsAnErrorWhenTryingToConnectOpenAnMdfFile.aspx" />
    <id>http://thesprage.com/DasBlog/PermaLink,guid,7fd5a503-9b67-46ff-a539-4dfe46f1de1d.aspx</id>
    <published>2009-04-11T11:15:20.038-07:00</published>
    <updated>2009-04-13T13:43:52.1020183-07:00</updated>
    <category term="Education" label="Education" scheme="http://thesprage.com/DasBlog/CategoryView,category,Education.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>Problem: </strong>You try to open a .mdf file in visual studio and you get
one of the following errors.
</p>
        <p>
          <em>Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function
properly.  Please verify the installation of the component or download from the
URL:  </em>
          <a href="http://go.microsoft.com/fwlink/?LinkId=49251">
            <em>http://go.microsoft.com/fwlink/?LinkId=49251</em>
          </a>
        </p>
        <p>
          <em>Failed to generate a user instance of SQL Server due to a failure in starting
the process for the user instance. The connection will be closed.</em>
        </p>
        <p>
          <strong>Solution: </strong>Open Server Explorer add Data Connection. Make sure the
Data Source = Microsoft SQL Server Database File (SqlClient) and browse to the .mdf
file located in your source directory(There maybe on located in the bin directory
but this will get copied over by what is in src on a build). Click the Advance button.
In order to work I needed to switch the Data Source to .\SQLEXPRESS2005 (<font color="#ff0000">This
will be different for each computer</font>). 
</p>
        <p>
Final connection string should look something like this:
</p>
        <font size="2">
          <p>
            <em>Data Source=.\SQLEXPRESS2005;AttachDbFilename=|DataDirectory|\NerdDinner.mdf;Integrated
Security=True;Connect Timeout=30;User Instance=True</em>
          </p>
        </font>
        <img src="http://thesprage.com/DasBlog/content/binary/AddConnection.png" border="0" />
        <img src="http://thesprage.com/DasBlog/content/binary/Advanced.png" border="0" />
        <img width="0" height="0" src="http://thesprage.com/DasBlog/aggbug.ashx?id=7fd5a503-9b67-46ff-a539-4dfe46f1de1d" />
      </div>
    </content>
  </entry>
  <entry>
    <title>ASP.Net MVC And Ninject</title>
    <link rel="alternate" type="text/html" href="http://TheSprage.com/DasBlog/2009/04/10/ASPNetMVCAndNinject.aspx" />
    <id>http://thesprage.com/DasBlog/PermaLink,guid,bc271aac-f54c-4179-8748-9ecbc0c9bdbd.aspx</id>
    <published>2009-04-10T16:58:03.972-07:00</published>
    <updated>2009-04-10T16:58:03.9726391-07:00</updated>
    <category term="C#" label="C#" scheme="http://thesprage.com/DasBlog/CategoryView,category,C%23.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>Problem: </strong>You want to be able use the Ninject frame work with the
new and shiny ASP.Net MVC framework.
</p>
        <p>
          <strong>Solution:</strong> Assembly: Ninject.Framework.MVC Contains an Abstract Base
class you can Inherit from to do most of your heavy lifting.
</p>
        <p>
 
</p>
        <p>
Some Code 
</p>
        <p>
Global.asax.cs
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> MvcApplication
: NinjectHttpApplication { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span> IKernel
_kernal; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">protected</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">override</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> RegisterRoutes(RouteCollection
routes) { routes.IgnoreRoute(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"{resource}.axd/{*pathInfo}"</span>);
routes.MapRoute( <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Default"</span>, <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//
Route name</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"{controller}/{action}/{id}"</span>, <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//
URL with parameters</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> {
controller <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Home"</span>,
action <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Index"</span>,
id <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">""</span> } <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//
Parameter defaults</span> ); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">protected</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">override</span> IKernel
CreateKernel() { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (_kernal
== <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>)
{ var modules <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> IModule[]
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> AutoControllerModule(Assembly.GetExecutingAssembly()), <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DemoModual()
}; _kernal <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> StandardKernel(modules);
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> _kernal;
} }</span>
        </pre>
        <img width="0" height="0" src="http://thesprage.com/DasBlog/aggbug.ashx?id=bc271aac-f54c-4179-8748-9ecbc0c9bdbd" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Inversion of Control vs Dependency Injection vs Strategy Pattern</title>
    <link rel="alternate" type="text/html" href="http://TheSprage.com/DasBlog/2009/02/18/InversionOfControlVsDependencyInjectionVsStrategyPattern.aspx" />
    <id>http://thesprage.com/DasBlog/PermaLink,guid,834e33c9-0488-48bb-9656-4d830a19ef7e.aspx</id>
    <published>2009-02-18T14:23:32.4561887-07:00</published>
    <updated>2009-02-18T14:23:32.4561887-07:00</updated>
    <category term="C#" label="C#" scheme="http://thesprage.com/DasBlog/CategoryView,category,C%23.aspx" />
    <category term="Education" label="Education" scheme="http://thesprage.com/DasBlog/CategoryView,category,Education.aspx" />
    <category term="VB.NET" label="VB.NET" scheme="http://thesprage.com/DasBlog/CategoryView,category,VB.NET.aspx" />
    <content type="html">&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt; 
&lt;p&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&lt;strong&gt;Warning&lt;/strong&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt; this
my understanding as of today, who knows what tomorrow will bring.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;/span&gt; 
&lt;p&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;I
often hear the terms Inversion of Control(IOC), Dependency Injection(DI) and the Strategy
Pattern thrown around in the same context, this was getting really confusing for me.
So, I spent a couple of hours trying to clarify the differences.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;IOC
vs DI: &lt;/span&gt;&lt;/strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Basically
DI is a type of IOC. IOC is a broad abstract principle that covers not only DI but
Event-Driven programming and numerous others.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;So
What is DI? &lt;/span&gt;&lt;/strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;DI
is the way you provide the implementation for a&amp;nbsp;dependent service. There are
a number of DI frameworks out there I have recently been playing with &lt;a href="http://ninject.org/"&gt;Ninject&lt;/a&gt;&amp;nbsp;mostly
because I like ninjas... and the flow syntax for wiring up the dependencies looks
nice.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;DI
vs Strategy Pattern&lt;/span&gt;&lt;/strong&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;:
For a while now I have been using&amp;nbsp;the Strategy pattern&amp;nbsp;thinking it was the
same as DI. I know, "Gosh such an idiot :P", but DI assembles the appropriate algorithms
for the calling class. Strategy is just one of the patterns that lends itself well
to DI.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;More Info:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://en.wikipedia.org/wiki/Dependency_injection"&gt;Dependency injection&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://en.wikipedia.org/wiki/Inversion_of_control"&gt;Inversion of control&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://martinfowler.com/articles/injection.html"&gt;Inversion of Control Containers
and the Dependency Injection pattern by Martin Fowler&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://ke-jin.blogspot.com/2008/03/inversion-of-control-vs-strategy.html"&gt;Inversion
of Control vs Strategy Pattern&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://ke-jin.blogspot.com/2009/02/ioc-containers-are-not-about-design.html"&gt;IoC
containers are not about a design pattern&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Thank you, &lt;a href=" http://ang3lfir3.wordpress.com" temp_href=" http://ang3lfir3.wordpress.com"&gt;Eric
Ridgeway&lt;/a&gt; for answering my 200 questions.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://thesprage.com/DasBlog/aggbug.ashx?id=834e33c9-0488-48bb-9656-4d830a19ef7e" /&gt;</content>
  </entry>
  <entry>
    <title>Unhandled Error in Silverlight 2 Application Code: 2104</title>
    <link rel="alternate" type="text/html" href="http://TheSprage.com/DasBlog/2009/02/17/UnhandledErrorInSilverlight2ApplicationCode2104.aspx" />
    <id>http://thesprage.com/DasBlog/PermaLink,guid,3aa10295-c710-4d6f-9250-ded5d7c0517c.aspx</id>
    <published>2009-02-17T00:11:02.991-07:00</published>
    <updated>2009-02-18T00:14:27.6112639-07:00</updated>
    <category term="Silverlight" label="Silverlight" scheme="http://thesprage.com/DasBlog/CategoryView,category,Silverlight.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>Problem: </strong>After deploying your silverlight application to your Web
server you get the following error.
</p>
        <address>Error: Unhandled Error in Silverlight 2 Application 
</address>
        <address>Code: 2104    
</address>
        <address>Category: InitializeError
</address>
        <address>Message: Could not download the Silverlight application. Check web server
settings     
</address>
        <address>Source File: TestPage.html
</address>
        <address>Line: 53
</address>
        <address> 
</address>
        <p>
          <strong>Solution: </strong>The MIME types on your webserver are not setup correctly
to host your silver light application. The MIME types needed are:
</p>
        <p>
.xaml    application/xaml+xml 
<br />
.xap    application/x-silverlight-app 
<br />
.xbap    application/x-ms-xbap 
</p>
        <p>
          <strong>Hack: </strong>If you are like me and have your silverlight hosted on a shared
hosting enviroment like godaddy you cannot change your MIME types. Instead change
the .xap to .zip you must also change the source paramater value inside your page
to match.
</p>
        <font size="2">
          <address>
          </address>
        </font>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <font size="2">
              <p>
              </p>
            </font>
            <font color="#a9a9a9">
              <font size="2">
                <font size="2">&lt;</font>
              </font>
              <font size="2">
                <font size="2">object</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">data</font>
              </font>
              <font size="2">
                <font size="2">="data:application/x-silverlight,"</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">type</font>
              </font>
              <font size="2">
                <font size="2">="application/x-silverlight-2"</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">width</font>
              </font>
              <font size="2">
                <font size="2">="100%"</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">height</font>
              </font>
              <font size="2">
                <font size="2">="100%"&gt;
</font>
              </font>
            </font>
            <p>
              <font size="3">
                <font size="2">
                  <strong>
                    <font color="#0000ff">
                      <font color="#0000ff">&lt;</font>
                    </font>
                    <font color="#a31515">
                      <font color="#a31515">param</font>
                    </font>
                    <font color="#ff0000">
                      <font color="#ff0000">name</font>
                    </font>
                    <font color="#0000ff">
                      <font color="#0000ff">="source"</font>
                    </font>
                    <font color="#ff0000">
                      <font color="#ff0000">value</font>
                    </font>
                    <font color="#0000ff">
                      <font color="#0000ff">="Microsoft.Windows.Controls.Samples.zip"/&gt;
</font>
                    </font>
                  </strong>
                </font>
              </font>
            </p>
            <font size="2">
              <p>
              </p>
            </font>
            <font color="#a9a9a9">
              <font size="2">
                <font size="2">&lt;</font>
              </font>
              <font size="2">
                <font size="2">param</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">name</font>
              </font>
              <font size="2">
                <font size="2">="onerror"</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">value</font>
              </font>
              <font size="2">
                <font size="2">="onSilverlightError"</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">/&gt;
</font>
              </font>
            </font>
            <font size="2">
              <p>
              </p>
            </font>
            <font color="#a9a9a9">
              <font size="2">
                <font size="2">&lt;</font>
              </font>
              <font size="2">
                <font size="2">param</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">name</font>
              </font>
              <font size="2">
                <font size="2">="background"</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">value</font>
              </font>
              <font size="2">
                <font size="2">="white"</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">/&gt;
</font>
              </font>
            </font>
            <font size="2">
              <p>
              </p>
            </font>
            <font color="#a9a9a9">
              <font size="2">
                <font size="2">&lt;</font>
              </font>
              <font size="2">
                <font size="2">param</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">name</font>
              </font>
              <font size="2">
                <font size="2">="minRuntimeVersion"</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">value</font>
              </font>
              <font size="2">
                <font size="2">="2.0.31005.0"</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">/&gt;
</font>
              </font>
            </font>
            <font size="2">
              <p>
              </p>
            </font>
            <font color="#a9a9a9">
              <font size="2">
                <font size="2">&lt;</font>
              </font>
              <font size="2">
                <font size="2">param</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">name</font>
              </font>
              <font size="2">
                <font size="2">="autoUpgrade"</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">value</font>
              </font>
              <font size="2">
                <font size="2">="true"</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">/&gt;
</font>
              </font>
            </font>
            <font size="2">
              <p>
              </p>
            </font>
            <font color="#a9a9a9">
              <font size="2">
                <font size="2">&lt;</font>
              </font>
              <font size="2">
                <font size="2">a</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">href</font>
              </font>
              <font size="2">
                <font size="2">="http://go.microsoft.com/fwlink/?LinkID=124807"</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">style</font>
              </font>
              <font size="2">
                <font size="2">="</font>
              </font>
              <font size="2">
                <font size="2">text-decoration</font>
              </font>
              <font size="2">: </font>
              <font size="2">
                <font size="2">none</font>
              </font>
              <font size="2">;</font>
              <font size="2">
                <font size="2">"&gt;
</font>
              </font>
            </font>
            <font size="2">
              <p>
              </p>
            </font>
            <font color="#a9a9a9">
              <font size="2">
                <font size="2">&lt;</font>
              </font>
              <font size="2">
                <font size="2">img</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">src</font>
              </font>
              <font size="2">
                <font size="2">="http://go.microsoft.com/fwlink/?LinkId=108181"</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">alt</font>
              </font>
              <font size="2">
                <font size="2">="Get
Microsoft Silverlight"</font>
              </font>
              <font size="2">
              </font>
              <font size="2">
                <font size="2">style</font>
              </font>
              <font size="2">
                <font size="2">="</font>
              </font>
              <font size="2">
                <font size="2">border-style</font>
              </font>
              <font size="2">: </font>
              <font size="2">
                <font size="2">none"/&gt;
</font>
              </font>
            </font>
            <font size="2">
              <p>
              </p>
            </font>
            <font color="#a9a9a9">
              <font size="2">
                <font size="2">&lt;/</font>
              </font>
              <font size="2">
                <font size="2">a</font>
              </font>
              <font size="2">
                <font size="2">&gt;
</font>
              </font>
            </font>
            <font size="2">
              <p>
              </p>
            </font>
            <font color="#a9a9a9">
              <font size="2">
                <font size="2">&lt;/</font>
              </font>
              <font size="2">
                <font size="2">object</font>
              </font>
              <font color="#0000ff" size="2">
                <font color="#0000ff" size="2">&gt;
</font>
              </font>
            </font>
          </span>
        </pre>
        <font color="#d3d3d3">
          <font color="#a9a9a9">
            <font color="#0000ff" size="2">
              <font color="#0000ff" size="2">
              </font>
            </font>
          </font>
        </font>
        <img width="0" height="0" src="http://thesprage.com/DasBlog/aggbug.ashx?id=3aa10295-c710-4d6f-9250-ded5d7c0517c" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Twitter</title>
    <link rel="alternate" type="text/html" href="http://TheSprage.com/DasBlog/2009/02/05/Twitter.aspx" />
    <id>http://thesprage.com/DasBlog/PermaLink,guid,ca0c1c12-97f7-49d7-8718-d7fa8f2c3ed5.aspx</id>
    <published>2009-02-05T13:59:23.873-07:00</published>
    <updated>2009-02-05T13:59:23.8732755-07:00</updated>
    <category term="Personal" label="Personal" scheme="http://thesprage.com/DasBlog/CategoryView,category,Personal.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just joined <a href="http://www.twitter.com">twitter</a> I have played around with
it before and never understood the appeal. Well I understand now you really need a
good client app, I use <a href="http://www.tweetdeck.com/beta/">TweetDeck</a>. After
that its all about the search, people use "hash codes" to assign categories to there
tweets(cool kid lingo for messages on twitter). e.g. #Seattle doing a search on this
hash forms a pseudo chat room then you just add #Seattle to any messages you want
to show up. Its a lot of fun.
</p>
        <p>
          <a href="http://www.hanselman.com/blog/">Scott</a> has a good <a href="http://www.hanselman.com/blog/HowToTwitterFirstStepsAndATwitterGlossary.aspx">guid
on twitter</a></p>
        <p>
          <a href="http://twitter.com/Aaronls79">My Twitter</a>
        </p>
        <p>
Search on a topic:
</p>
        <p>
          <img src="http://thesprage.com/DasBlog/content/binary/toolbar.png" border="0" />
        </p>
        <p>
          <img src="http://thesprage.com/DasBlog/content/binary/search.png" border="0" />
        </p>
        <p>
Send tweets on this topic:
</p>
        <p>
          <img src="http://thesprage.com/DasBlog/content/binary/msg.png" border="0" />
        </p>
        <p>
See whats going on:
</p>
        <img src="http://thesprage.com/DasBlog/content/binary/searchRoom.png" border="0" />
        <img width="0" height="0" src="http://thesprage.com/DasBlog/aggbug.ashx?id=ca0c1c12-97f7-49d7-8718-d7fa8f2c3ed5" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Generic List Operations</title>
    <link rel="alternate" type="text/html" href="http://TheSprage.com/DasBlog/2009/02/04/GenericListOperations.aspx" />
    <id>http://thesprage.com/DasBlog/PermaLink,guid,45013709-6ffd-4d22-9078-9323ddb08a78.aspx</id>
    <published>2009-02-04T12:53:46.328-07:00</published>
    <updated>2009-02-04T12:53:46.3280238-07:00</updated>
    <category term="C#" label="C#" scheme="http://thesprage.com/DasBlog/CategoryView,category,C%23.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>Problem</strong>: You need a quick and easy way to manipulate elements contained
in a list.
</p>
        <p>
          <strong>Solution</strong>: Lambda Expression, these expressions are used in the same
fashion you would use anonymous methods but are less wordy.
</p>
        <p>
Anonymous methods:
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">employees.FindAll(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">delegate</span>(employee
e1) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> e1.Name
== <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Dave"</span>;
})</span>
        </pre>
        <p>
Lambda Expression:
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">employees.FindAll(e1
=&gt; e1.Name == <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Dave"</span>);</span>
        </pre>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <pre>
              <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">employees.Sort((e1,e2)
=&gt; e1.LastName.CompareTo(e2.LastName));</span>
            </pre>
          </span>
        </pre>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <font face="Verdana" color="#003300" size="2">For
more complex expressions use the syntax like (params) =&gt; {statment}.</font>
          </span>
        </p>
        <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
          <font face="Verdana" color="#003300" size="2">
            <pre>
              <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">employees.Sort((e1,
e2) =&gt; { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (e1.LastName.CompareTo(e2.LastName)
== 0) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> e1.FirstName.CompareTo(e2.FirstName);
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">else</span> { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> e1.LastName.CompareTo(e2.LastName);
} });</span>
            </pre>
            <pre>
              <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                  <font face="Verdana" color="#003300" size="2">For
more Info:</font>
                </span>
              </span>
            </pre>
            <pre>
              <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                  <font face="Verdana" color="#003300" size="2">
                    <a href="http://msdn.microsoft.com/en-us/library/bb397687.aspx">MSDN</a>
                  </font>
                </span>
              </span>
            </pre>
          </font>
        </span>
        <img width="0" height="0" src="http://thesprage.com/DasBlog/aggbug.ashx?id=45013709-6ffd-4d22-9078-9323ddb08a78" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Resharper Templates</title>
    <link rel="alternate" type="text/html" href="http://TheSprage.com/DasBlog/2008/06/12/ResharperTemplates.aspx" />
    <id>http://thesprage.com/DasBlog/PermaLink,guid,370974ca-194e-429e-b161-527eed275b4f.aspx</id>
    <published>2008-06-12T11:27:34.263-07:00</published>
    <updated>2008-06-12T11:27:34.2634801-07:00</updated>
    <category term="C#" label="C#" scheme="http://thesprage.com/DasBlog/CategoryView,category,C%23.aspx" />
    <category term="Personal" label="Personal" scheme="http://thesprage.com/DasBlog/CategoryView,category,Personal.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I like and use <a href="http://www.jetbrains.com/resharper/">Resharper</a> because
it is cheaper than <a href="http://www.devexpress.com/Products/NET/IDETools/CodeRush/index.xml">CodeRush</a> and
I don't have to remember as many key commands most things are done with an alt + enter.
It also works well with Unit Testing and for more yummy goodness with testing download <a href="http://www.jpboodhoo.com/blog/default.aspx">JP's</a><a href="http://www.jpboodhoo.com/blog/CommentView,guid,484bdd76-0a28-47d4-a796-2220364073e7.aspx#commentstart">templates</a> for
Resharper.
</p>
        <p>
          <a href="http://thesprage.com/DasBlog/content/binary/livetemplates.xml">livetemplates.xml
(14.74 KB)</a>
        </p>
        <a href="http://thesprage.com/DasBlog/content/binary/filetemplates.xml">filetemplates.xml
(3.79 KB)</a>
        <img width="0" height="0" src="http://thesprage.com/DasBlog/aggbug.ashx?id=370974ca-194e-429e-b161-527eed275b4f" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Wildwood Campsites</title>
    <link rel="alternate" type="text/html" href="http://TheSprage.com/DasBlog/2008/06/12/WildwoodCampsites.aspx" />
    <id>http://thesprage.com/DasBlog/PermaLink,guid,7fc2c3fb-df88-4418-b325-0372f66a1cb8.aspx</id>
    <published>2008-06-12T10:13:29.601-07:00</published>
    <updated>2008-06-12T10:15:02.1473129-07:00</updated>
    <category term="Projects" label="Projects" scheme="http://thesprage.com/DasBlog/CategoryView,category,Projects.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just finished with a client’s website <a href="http://www.wildwoodcampsites.com">www.wildwoodcampsites.com</a>,
I am pretty happy with it and so are they. 
</p>
        <p>
Few things that where fun was implementing a "<a href="http://www.wildwoodcampsites.com/dotnetnuke/Directions/tabid/225/Default.aspx">Get
Directions</a>," Map with Microsoft Virtual Earth and a Silverlight <a href="http://www.wildwoodcampsites.com/dotnetnuke/Attractions/tabid/227/Default.aspx">picture
viewer</a>. I have worked with the Google maps api in the past it wasn't bad, but
I hate the registration it makes it a pain to move and reuse. I found virtual Earth
API far superior with great examples. I was able to get something cool up and working
with little Java Script experience. The picture viewer I did not code from scratch,
dnntemplet.com was offering it for free as a Beta version; although it didn't work
I was able to fix it by digging around in the source code. I am really excited
to see what the web will look like coming up with Flex.org and Silverlight 2.0
</p>
        <img width="0" height="0" src="http://thesprage.com/DasBlog/aggbug.ashx?id=7fc2c3fb-df88-4418-b325-0372f66a1cb8" />
      </div>
    </content>
  </entry>
  <entry>
    <title>I love my job</title>
    <link rel="alternate" type="text/html" href="http://TheSprage.com/DasBlog/2008/06/11/ILoveMyJob.aspx" />
    <id>http://thesprage.com/DasBlog/PermaLink,guid,c6c56940-e799-4989-977b-a1d9e35cef0b.aspx</id>
    <published>2008-06-11T13:46:04.058-07:00</published>
    <updated>2008-06-11T13:46:04.0588625-07:00</updated>
    <category term="Personal" label="Personal" scheme="http://thesprage.com/DasBlog/CategoryView,category,Personal.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I love my job it's the best <a href="http://money.cnn.com/magazines/moneymag/bestjobs/2006/top50/index.html">job
in the America</a>.
</p>
        <img width="0" height="0" src="http://thesprage.com/DasBlog/aggbug.ashx?id=c6c56940-e799-4989-977b-a1d9e35cef0b" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Configuration System Failed to Initialize</title>
    <link rel="alternate" type="text/html" href="http://TheSprage.com/DasBlog/2008/05/23/ConfigurationSystemFailedToInitialize.aspx" />
    <id>http://thesprage.com/DasBlog/PermaLink,guid,a2987fec-6dee-474d-815a-71e38011612b.aspx</id>
    <published>2008-05-23T12:14:46.234-07:00</published>
    <updated>2008-05-23T12:14:46.2347462-07:00</updated>
    <category term="C#" label="C#" scheme="http://thesprage.com/DasBlog/CategoryView,category,C%23.aspx" />
    <category term="VB.NET" label="VB.NET" scheme="http://thesprage.com/DasBlog/CategoryView,category,VB.NET.aspx" />
    <content type="html">&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&lt;strong&gt;Problem&lt;/strong&gt;: Your application
contains User Scope Settings and you receive the exception,&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&lt;em&gt;“Configuration system failed
to initialize” &lt;/em&gt;when attempting to retrieve these settings.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&lt;strong&gt;Solution&lt;/strong&gt;: The settings
file has been corrupted and is unreadable. Close or stop your application and &lt;font color=#ff0000&gt;delete&lt;/font&gt; the &lt;font color=#ff0000&gt;user.config&lt;/font&gt; file.
The file is located at:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;C:\Documents and Settings\[UserName]\Local
Settings\Application Data\[AppCompany]\[AppName] \[AppVersion]\ &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" 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="Times New Roman" color=#000000 size=3&gt;If you are in Visual Studio you
can easily find the exact file that is causing the problem by viewing the details
and drilling down to the inner exception to find the file name.&lt;/font&gt;
&lt;/p&gt;
&lt;img src="http://thesprage.com/DasBlog/content/binary/exceptionDetails.png" border=0&gt;&lt;img src="http://thesprage.com/DasBlog/content/binary/viewDetail.png" border=0&gt;&lt;img width="0" height="0" src="http://thesprage.com/DasBlog/aggbug.ashx?id=a2987fec-6dee-474d-815a-71e38011612b" /&gt;</content>
  </entry>
</feed>