<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" 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:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Kelly Brownsberger's Blog</title>
        <link>http://blog.kellybrownsberger.com/Default.aspx</link>
        <description />
        <language>en-US</language>
        <copyright>kellyb</copyright>
        <generator>Subtext Version 2.1.0.5</generator>
        <image>
            <title>Kelly Brownsberger's Blog</title>
            <url>http://blog.kellybrownsberger.com/images/RSS2Image.gif</url>
            <link>http://blog.kellybrownsberger.com/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Great Michigan .NET User Group Meeting Last Night</title>
            <link>http://blog.kellybrownsberger.com/archive/2010/07/22/86.aspx</link>
            <description>&lt;p&gt;I’ve been to a lot of user group meetings over the years in various cities, but I think the best one I’ve ever been to was last night’s &lt;a href="http://migang.org" target="_blank"&gt;migang.org&lt;/a&gt;’s gathering at the Microsoft office in Southfield, MI.  &lt;a href="http://geekswithblogs.net/ignu/Default.aspx" target="_blank"&gt;Len Smith&lt;/a&gt; presented &lt;em&gt;Javascript is Real Code:  SOLID and TDD in the Browser&lt;/em&gt;.  I really dug the topic and Len’s presentation, but I was impressed by the people and the group - Lots of very friendly folks with a great sense of community.  &lt;a href="http://www.davidgiard.com/" target="_blank"&gt;Dave Giard&lt;/a&gt; does a great job organizing the group and fostering a friendly, communal, ego-less vibe.&lt;/p&gt;  &lt;p&gt;I really enjoyed being there and planned to go back often.&lt;/p&gt;&lt;img src="http://blog.kellybrownsberger.com/aggbug/86.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>kellyb</dc:creator>
            <guid>http://blog.kellybrownsberger.com/archive/2010/07/22/86.aspx</guid>
            <pubDate>Thu, 22 Jul 2010 11:56:01 GMT</pubDate>
            <wfw:comment>http://blog.kellybrownsberger.com/comments/86.aspx</wfw:comment>
            <comments>http://blog.kellybrownsberger.com/archive/2010/07/22/86.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.kellybrownsberger.com/comments/commentRss/86.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Backing up with T-SQL</title>
            <category>cheatsheet</category>
            <link>http://blog.kellybrownsberger.com/archive/2010/07/09/84.aspx</link>
            <description>&lt;p&gt;I never remember this syntax, so here it is for future reference:&lt;/p&gt;  &lt;p&gt;To back with a SQL Server database with T-SQL, this is the command:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;BACKUP&lt;/span&gt; &lt;span class="kwrd"&gt;DATABASE&lt;/span&gt; [YourDb] &lt;span class="kwrd"&gt;TO&lt;/span&gt;
&lt;span class="kwrd"&gt;DISK&lt;/span&gt; = N&lt;span class="str"&gt;'C:\YourDb.bak'&lt;/span&gt; &lt;span class="kwrd"&gt;WITH&lt;/span&gt; STATS = 1&lt;/pre&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Be careful with using WITH STATS = 1 on very large databases&lt;/p&gt;&lt;img src="http://blog.kellybrownsberger.com/aggbug/84.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>kellyb</dc:creator>
            <guid>http://blog.kellybrownsberger.com/archive/2010/07/09/84.aspx</guid>
            <pubDate>Fri, 09 Jul 2010 13:03:07 GMT</pubDate>
            <wfw:comment>http://blog.kellybrownsberger.com/comments/84.aspx</wfw:comment>
            <comments>http://blog.kellybrownsberger.com/archive/2010/07/09/84.aspx#feedback</comments>
            <wfw:commentRss>http://blog.kellybrownsberger.com/comments/commentRss/84.aspx</wfw:commentRss>
        </item>
        <item>
            <title>VS2010 Performance</title>
            <category>visual studio</category>
            <link>http://blog.kellybrownsberger.com/archive/2010/06/08/82.aspx</link>
            <description>&lt;p&gt;My team immediately started using Visual Studio 2010 after it’s release in April.  We were waiting early for Silverlight 4 which was a component of the release, so we switched IDE’s right away.  I like the feature set very much, but the performance is subpar and plain awful in some areas.  I am running Resharper 5.1 EAP (nightly builds).  5.0 had a number of issues and several performance problems.  I upgraded to 5.1 after reading &lt;a href="http://www.jetbrains.net/devnet/message/5264958#5264958" target="_blank"&gt;this thread on JetBrain’s forum&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;It’s hard to tell whether the performance issues are caused by the core IDE or Resharper, but there seems to be reports of performance issues in both.  Here some interesting posts on issues related to the core IDE:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/ricom/archive/2009/05/31/visual-studio-2010-performance-part-1-startup.aspx" target="_blank"&gt;Visual Studio 2010 Performance Part 1: Startup&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/ricom/archive/2009/06/05/visual-studio-2010-performance-part-2-text-editor.aspx" target="_blank"&gt;Visual Studio 2010 Performance Part 2: Text Editor&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/ricom/archive/2009/08/19/visual-studio-2010-performance-part-3-a-technical-update.aspx" target="_blank"&gt;Visual Studio 2010 Performance Part 3: A Technical Update&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;It’s going to be awhile for these wrinkles to get ironed out.  My team is all-in, and patiently awaiting fixes and work around’s.  On promising lead on was posted on the previously mentioned JetBrains forum thread:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="https://connect.microsoft.com/VisualStudio/feedback/details/559846/vs2010-bad-performance-scroll-is-extremely-slow?wa=wsignin1.0" target="_blank"&gt;VS2010 bad performance, scroll is extremely slow&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;It basically states that clearing out the following VS options greatly improves scrolling performance:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.kellybrownsberger.com/____Uploads____/VS2010Performance_5561/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.kellybrownsberger.com/____Uploads____/VS2010Performance_5561/image_thumb.png" width="761" height="444" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I’ll give this a shot for a while and see if it improves things&lt;/p&gt;&lt;img src="http://blog.kellybrownsberger.com/aggbug/82.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>kellyb</dc:creator>
            <guid>http://blog.kellybrownsberger.com/archive/2010/06/08/82.aspx</guid>
            <pubDate>Tue, 08 Jun 2010 10:04:45 GMT</pubDate>
            <wfw:comment>http://blog.kellybrownsberger.com/comments/82.aspx</wfw:comment>
            <comments>http://blog.kellybrownsberger.com/archive/2010/06/08/82.aspx#feedback</comments>
            <wfw:commentRss>http://blog.kellybrownsberger.com/comments/commentRss/82.aspx</wfw:commentRss>
        </item>
        <item>
            <title>My take on the ViewModelLocator pattern for MVVM</title>
            <category>silverlight</category>
            <link>http://blog.kellybrownsberger.com/archive/2010/03/31/81.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://johnpapa.net/silverlight/simple-viewmodel-locator-for-mvvm-the-patients-have-left-the-asylum/" target="_blank"&gt;John Papa&lt;/a&gt; and &lt;a href="http://codebetter.com/blogs/glenn.block/archive/2010/03/30/view-model-locator-mef-style.aspx" target="_blank"&gt;Glen Block&lt;/a&gt; have recently posted on a topic that touched home for me.  They put together a solution to find view models for a given view in a view-first fashion to support Blendability and a clean MVVM presentation pattern.  Funny, I put this very pattern together last week after being motivated by what I saw from &lt;a href="http://devlicio.us/blogs/rob_eisenberg/archive/2010/03/16/build-your-own-mvvm-framework-is-online.aspx" target="_blank"&gt;Rob Eisenberg&lt;/a&gt; and &lt;a href="http://www.galasoft.ch/" target="_blank"&gt;Laurent Bugnion&lt;/a&gt; at MIX the week before.  I too came to the conclusion that it makes a lot of sense to go with a View-first approach if you’re going to make Blend a first class citizen in your development process (as I believe you should).&lt;/p&gt; &lt;p&gt;What John and Glen put together is MEF based (obviously), but what I put together is IoC based.  In my case I’m using Unity, but it could be any IoC container.  With a very simple convention, I can greatly simplify this entire pattern.  That convention is this:  The View and the ViewModel will always reside in the same namespaces within the same assembly and the View will always be suffixed with xxxxxView and the ViewModel will always be suffixed with xxxxxViewModel.  That’s it.  With that convention in place, one line of markup can be used in all views to auto-locate, instantiate, and bind to it’s corresponding ViewModel.  No need to Export anything with MEF and no need to have string names on your exports to find by.  I like my approach a lot better and my team has been very happy with it so far.  It’s very simple, straightforward and requires very little ceremony code.&lt;/p&gt; &lt;p&gt;Below is what the code looks like…&lt;/p&gt; &lt;p&gt;All views have this markup at the root element:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="attr"&gt;DataContext&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding RelativeSource={RelativeSource Self},  Converter={StaticResource LocatorConverter} }"&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;This is simply binding the View’s DataContext to itself and passing itself to the LocatorConverter.  The LocatorConverter looks like this:&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ViewModelLocator
    {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt; Locate(&lt;span class="kwrd"&gt;object&lt;/span&gt; view)
        {
            &lt;span class="kwrd"&gt;try&lt;/span&gt;
            {
                Check.ForNullArg(view, &lt;span class="str"&gt;"view"&lt;/span&gt;);

                Type viewType = view.GetType();
                &lt;span class="kwrd"&gt;string&lt;/span&gt; viewTypeName = viewType.Name;

                Logger.WriteInfo(&lt;span class="str"&gt;"Attempting to auto-resolve the view model from the view (type: {0})"&lt;/span&gt;, viewTypeName);

                &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(viewTypeName) || !viewTypeName.EndsWith(&lt;span class="str"&gt;"View"&lt;/span&gt;))
                {
                    &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; PresentationModelException(&lt;span class="str"&gt;"Attempting to locate a view model instance for an invalid {0} implementation - expected the type name to be suffixed with 'View'"&lt;/span&gt;, &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(IView).Name);
                }

                &lt;span class="kwrd"&gt;string&lt;/span&gt; viewModelTypeName = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Concat(viewTypeName, &lt;span class="str"&gt;"Model"&lt;/span&gt;);

                var viewModelTypeFullName = viewType.AssemblyQualifiedName.Replace(viewTypeName, viewModelTypeName);

                var viewModelType = Type.GetType(viewModelTypeFullName);

                &lt;span class="kwrd"&gt;if&lt;/span&gt; (viewModelType == &lt;span class="kwrd"&gt;null&lt;/span&gt;)
                {
                    &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; PresentationModelException(&lt;span class="str"&gt;"Could not find view model type '{0}' in namespace '{1}' within assembly '{2}'.  Auto resolution of the view model requires both the view and the view model to reside within the same namespace."&lt;/span&gt;, viewModelTypeName, viewType.Namespace, viewType.Assembly.FullName);
                }

                &lt;span class="kwrd"&gt;object&lt;/span&gt; resolved = IoC.Resolve(viewModelType);

                &lt;span class="kwrd"&gt;if&lt;/span&gt; (resolved == &lt;span class="kwrd"&gt;null&lt;/span&gt;)
                {
                    &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; PresentationModelException(&lt;span class="str"&gt;"Failed to resolve the view model type '{0}'"&lt;/span&gt;, viewModelTypeFullName);
                }

                Logger.WriteInfo(&lt;span class="str"&gt;"Successfully auto-resolved view model (type {0})"&lt;/span&gt;, viewModelTypeFullName);

                &lt;span class="kwrd"&gt;return&lt;/span&gt; resolved;
            }
            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception ex)
            {
                &lt;span class="kwrd"&gt;string&lt;/span&gt; viewType = view != &lt;span class="kwrd"&gt;null&lt;/span&gt; ? view.GetType().FullName : &lt;span class="str"&gt;"NULL"&lt;/span&gt;;

                &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; PresentationModelException(ex, &lt;span class="str"&gt;"The attempt to auto-instantiate the view model for the view '{0}' threw an exception: {1}.  See the inner exception for details."&lt;/span&gt;, viewType, ex.Message);
            }
        }&lt;/pre&gt;&lt;pre class="csharpcode"&gt;
&lt;/pre&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
]]&gt;&lt;/style&gt;

&lt;p&gt;IoC is a very think shim around Unity that’s setup by our application’s Bootstrapping process:&lt;/p&gt;&lt;pre class="csharpcode"&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt; Resolve(Type type)
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; _container.Resolve(type);
        }

&lt;/pre&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
]]&gt;&lt;/style&gt;

&lt;p&gt;I love MEF, but this doesn’t feel like a good fit for MEF to me – at least not in it’s current form.&lt;/p&gt;&lt;img src="http://blog.kellybrownsberger.com/aggbug/81.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>kellyb</dc:creator>
            <guid>http://blog.kellybrownsberger.com/archive/2010/03/31/81.aspx</guid>
            <pubDate>Thu, 01 Apr 2010 01:51:38 GMT</pubDate>
            <wfw:comment>http://blog.kellybrownsberger.com/comments/81.aspx</wfw:comment>
            <comments>http://blog.kellybrownsberger.com/archive/2010/03/31/81.aspx#feedback</comments>
            <wfw:commentRss>http://blog.kellybrownsberger.com/comments/commentRss/81.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Handy Serialization Extension Method, Clean code with Action&amp;lt;T&amp;gt;</title>
            <category>silverlight</category>
            <link>http://blog.kellybrownsberger.com/archive/2010/03/23/79.aspx</link>
            <description>&lt;p&gt;Here’s a handy Extension Method in C# that attaches a “ToXml()” method to any and all object instances.  I added the capability to dictate whether or not to use the classic XmlSerializer or the DataContractSerializer that came to us with WCF.  I made the XmlSerializer the default because typically, when I’m doing this programmatically in my code, it’s intended for human eyes and the XmlSerializer is far more readable, but the DataContractSerializer is what’s actually used at runtime by WCF.  So, call the overload the matters to you.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; ToXml&amp;lt;T&amp;gt;(&lt;span class="kwrd"&gt;this&lt;/span&gt; T obj) &lt;span class="kwrd"&gt;where&lt;/span&gt; T : &lt;span class="kwrd"&gt;class&lt;/span&gt;
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; ToXml(obj, &lt;span class="kwrd"&gt;false&lt;/span&gt;);
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; ToXml&amp;lt;T&amp;gt;(&lt;span class="kwrd"&gt;this&lt;/span&gt; T obj, &lt;span class="kwrd"&gt;bool&lt;/span&gt; useDataContractSerializer) &lt;span class="kwrd"&gt;where&lt;/span&gt; T : &lt;span class="kwrd"&gt;class&lt;/span&gt;
        {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (obj != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
            {
                Type type = &lt;span class="kwrd"&gt;typeof&lt;/span&gt; (T);

                Action&amp;lt;XmlWriter, &lt;span class="kwrd"&gt;object&lt;/span&gt;&amp;gt; action;
                
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (useDataContractSerializer)
                {
                    action = &lt;span class="kwrd"&gt;new&lt;/span&gt; DataContractSerializer(type).WriteObject;
                }
                &lt;span class="kwrd"&gt;else&lt;/span&gt;
                {
                    action = &lt;span class="kwrd"&gt;new&lt;/span&gt; XmlSerializer(type).Serialize;
                }


                &lt;span class="kwrd"&gt;using&lt;/span&gt; (MemoryStream stream = &lt;span class="kwrd"&gt;new&lt;/span&gt; MemoryStream())
                {
                    XmlWriterSettings settings = &lt;span class="kwrd"&gt;new&lt;/span&gt; XmlWriterSettings { Encoding = Encoding.UTF8, Indent = &lt;span class="kwrd"&gt;true&lt;/span&gt; };
                    XmlWriter writer = XmlWriter.Create(stream, settings);

                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (writer != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
                    {
                        &lt;span class="kwrd"&gt;byte&lt;/span&gt;[] bytes;

                        &lt;span class="kwrd"&gt;using&lt;/span&gt; (writer)
                        {
                            action(writer, obj);
                            writer.Flush();
                            stream.Flush();

                            bytes = stream.ToArray();
                        }

                        &lt;span class="kwrd"&gt;return&lt;/span&gt; Encoding.UTF8.GetString(bytes, 0, bytes.Length);
                    }
                }
            }

            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;null&lt;/span&gt;;
        }&lt;/pre&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;&lt;style type="text/css"&gt;&lt;![CDATA[

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;This is a good example of C# generics using Action&amp;lt;T&amp;gt;.  Notice I’m assigning the variable “action” to either the XmlSerializer’s Serialize() method, or the DataContractSerializer’s WriteObject() – which both have a method overload of &lt;em&gt;void (XmlWriter writer, object obj)&lt;/em&gt;.  I really like this syntax as it provides yet another way to remove duplication from your code without requiring the types to share a base class or interface, and without having to create a full blown Template Method pattern implementation.&lt;/p&gt;

&lt;p&gt;And it works in Silverlight too :)&lt;/p&gt;&lt;img src="http://blog.kellybrownsberger.com/aggbug/79.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>kellyb</dc:creator>
            <guid>http://blog.kellybrownsberger.com/archive/2010/03/23/79.aspx</guid>
            <pubDate>Wed, 24 Mar 2010 03:44:34 GMT</pubDate>
            <wfw:comment>http://blog.kellybrownsberger.com/comments/79.aspx</wfw:comment>
            <comments>http://blog.kellybrownsberger.com/archive/2010/03/23/79.aspx#feedback</comments>
            <wfw:commentRss>http://blog.kellybrownsberger.com/comments/commentRss/79.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Cleaning up after a rough week with Oracle</title>
            <category>visual studio</category>
            <link>http://blog.kellybrownsberger.com/archive/2010/02/14/78.aspx</link>
            <description>&lt;p&gt;I had a pretty rough week attempting to get the Oracle client installed on my Windows 7 – 64bit machine.  I’m going resist the temptation to throw stones, but let’s just say it was a frustrating week.&lt;/p&gt;  &lt;p&gt;Today I went to the Server Explorer in Visual Studio 2008 to do some work with the ADO.NET Entity Framework.  When attempting to connect the designer to my local SQL Server, I immediately received this&lt;/p&gt;  &lt;p&gt;&lt;em&gt;An unexpected error occurred in the Oracle Data Provider for .NET.  Please contact the provider vendor to resolve this problem.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.kellybrownsberger.com/____Uploads____/CleaningupafteraroughweekwithOracle_F369/image.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.kellybrownsberger.com/____Uploads____/CleaningupafteraroughweekwithOracle_F369/image_thumb.png" width="479" height="175" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Siiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiigh&lt;/p&gt;  &lt;p&gt;Even though I’ve uninstalled every trace of Oracle from my machine from the Add/Remove Programs dialog, Oracle seems to have failed to cleanup after itself and it’s still left some damaging residue in my registry.&lt;/p&gt;  &lt;p&gt;It took a while and some googling to figure this out, but the solution is to find all occurrences of the following GUID in your Windows registry and delete each one.  I found about 25 of these.  After deleting them all and restarting Visual Studio, it looks like I’m back in business.&lt;/p&gt;  &lt;p&gt;D601BB95-E404-4A8E-9F24-5C1A462426CE&lt;/p&gt;&lt;img src="http://blog.kellybrownsberger.com/aggbug/78.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>kellyb</dc:creator>
            <guid>http://blog.kellybrownsberger.com/archive/2010/02/14/78.aspx</guid>
            <pubDate>Sun, 14 Feb 2010 22:18:48 GMT</pubDate>
            <wfw:comment>http://blog.kellybrownsberger.com/comments/78.aspx</wfw:comment>
            <comments>http://blog.kellybrownsberger.com/archive/2010/02/14/78.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://blog.kellybrownsberger.com/comments/commentRss/78.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Restoring Base Image of my Dell Latitude E6400 from my WHS and NIC driver pangs</title>
            <category>windows home server</category>
            <category>tools</category>
            <link>http://blog.kellybrownsberger.com/archive/2010/02/09/77.aspx</link>
            <description>&lt;p&gt;My company issued me a new Dell Latitude E6400.  It’s a fine machine, and I like it very much.  Yesterday our system tech hands me the machine brand spanking new with our base company image on it (Windows 7 Enterprise – 64 bit).  My plan was take the image on this machine and copy it to the solid state hard drive that I have in my personal laptop.  I don’t need this Lenovo T61, but it’s got a blazing fast SSD in it and I want to use that – not this old school SATA thing that came w/ my dell.  So my plan was this:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Get the machine completely up to date in terms of Windows Updates&lt;/li&gt;    &lt;li&gt;Install all of the common stuff that I require on all machine.  Basically, &lt;a href="http://blog.kellybrownsberger.com/archive/0001/01/01/65.aspx" target="_blank"&gt;all of this stuff&lt;/a&gt;, minus the developer tools – this is what I call a “base image” for myself&lt;/li&gt;    &lt;li&gt;Back up this “base image” to my Windows Home Server – this should give me a restore-able snapshot in time that essentially hardware agnostic.&lt;/li&gt;    &lt;li&gt;Remove the solid state hard drive from my T61 and install it as my main hard drive on my E6400&lt;/li&gt;    &lt;li&gt;Restore the base image onto this solid state drive and… presto – new machine running on my solid state hard drive and using my “base image”&lt;/li&gt;    &lt;li&gt;Install all of my other software, take another backup at that point, and then happily go on about my life&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For those of you who are not familiar with Windows Home Server, the above scenario is not magic.  This is a pretty common thing – I’ve done this many times before.&lt;/p&gt;  &lt;p&gt;The problem I had today was I could not for the life of me getting the WHS Restore Disk to recognize my network adapter.  I’ve never had this issue before with other machines I’ve restored.  I simply booted up w/ the restore disk, it found the hardware it needed (essentially the NIC and your hard drive(s)) and it just worked.  This time, when I reached the “Detect Hardware” screen, the WHS Restore software couldn’t find my network adapter.  Without connectivity, there’s no way to restore from the WHS.  Luckily, the Restore software gives you the option to insert a USB Flash Drive or Floppy at the Detect Hardware screen.  It will let you provide drivers if you have them.  That’s nice, but you have to find the right drives that will work w/ the Restore software.  I spent several hours last night working on this with no success.  This morning I found the solution.  But first, the things I tried that didn’t work:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;I put the original hard drive (issued from my company) back in, and cherry picked the drives from C:\Windows, copied them to a USB Flash Drive, rebooted into the Restore software, and let it scan the flash drive.  Result:  &lt;font color="#ff0000"&gt;&lt;strong&gt;Still couldn’t find the NIC&lt;/strong&gt;&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;With WHS you can “open” an image.  In other words, when I backed up my Dell in bullet 3 above, WHS will let me open this open and copy files from it.  This is a pretty wicked feature.  It essentially creates a mapped drive on the PC you’re using to talk to the WHS, and lets you copy from it.  In my case, it looked like this:     &lt;br /&gt;&lt;a href="http://blog.kellybrownsberger.com/____Uploads____/RestoringBaseImageofmyDellLatitudeE6400f_6E14/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.kellybrownsberger.com/____Uploads____/RestoringBaseImageofmyDellLatitudeE6400f_6E14/image_thumb.png" width="244" height="166" /&gt;&lt;/a&gt;  &lt;br /&gt;So, following &lt;a href="http://www.homeserverland.com/f/12/t/908.aspx" target="_blank"&gt;the advice in this forum&lt;/a&gt;, I tried copying the drivers from this image (because I know those drivers worked w/ this hardware before I got into all this restore stuff).  I did the same copy-to-flash-drive-then-reboot-then-scan-for-drivers dance, the result:  &lt;font color="#ff0000"&gt;&lt;strong&gt;Still couldn’t find the NIC&lt;/strong&gt;&lt;/font&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I gave up for the night.  After a good night’s sleep and mentally shifted back to the basics.  I know the NIC works when running under Window 7 64bit Enterprise.  What’s different now?  Well, it’s not Window 7 64bit Enterprise that’s trying access the NIC, is it?  This is the WHS Restore software.  Ok, what is that?  It’s obviously some tiny little version of Windows.  Then it dawns on me, I’m barking up the wrong tree.  This probably has nothing to do with 64 bit.  I highly doubt this tiny little version of Windows is 64 bit.  It’s most likely a little version of Windows XP if I had to guess.  The Restore disk doesn’t have default drivers for my hardware.  That’s a shame, but it happens from time to time.  And, I’ve been trying to feed this this thing 64 bit drivers, which it doesn’t like.  This forum I referenced early eluded to this a bit by advising to copy both System32 (32 bit drivers) &lt;u&gt;and&lt;/u&gt; SysWOW64 (64 bit drivers).  For whatever reason, it didn’t like those drives (32 bit or 64 bit).  I’m guessing it didn’t like them because these are the Windows 7 versions of the drivers.&lt;/p&gt;  &lt;p&gt;Here’s what I did to fix this.  According to Dell, my NIC is a &lt;em&gt;&lt;strong&gt;Intel 825xx Gigabit Platform LAN Network Device&lt;/strong&gt;&lt;/em&gt;.  I googled around for drivers, and the normal shady sites came up. Then I realized that Dell.com had versions of these drivers for both Win 7 and Win XP/Vista and 32 and 64 bit versions of each.  This supported my theory and made good common sense.  So, I did the following:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://support.dell.com/support/downloads/download.aspx?c=us&amp;amp;cs=555&amp;amp;l=en&amp;amp;s=biz&amp;amp;releaseid=R247419&amp;amp;SystemID=lat_e6400&amp;amp;servicetag=HJZNRK1&amp;amp;os=WLH&amp;amp;osl=en&amp;amp;deviceid=11814&amp;amp;devlib=0&amp;amp;typecnt=0&amp;amp;vercnt=5&amp;amp;catid=-1&amp;amp;impid=-1&amp;amp;formatcnt=1&amp;amp;libid=5&amp;amp;typeid=-1&amp;amp;dateid=-1&amp;amp;formatid=-1&amp;amp;fileid=360749" target="_blank"&gt;Downloaded version 9.52.25.2, A02 of the Intel drive from dell&lt;/a&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Extracted this install and copied the entire contents to my USB Flash Drive&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;a href="http://support.dell.com/support/downloads/download.aspx?c=us&amp;amp;l=en&amp;amp;s=gen&amp;amp;releaseid=R148561&amp;amp;SystemID=PLX_PNT_P4_745C&amp;amp;servicetag=&amp;amp;os=WW1&amp;amp;osl=en&amp;amp;deviceid=11814&amp;amp;devlib=0&amp;amp;typecnt=0&amp;amp;vercnt=1&amp;amp;catid=-1&amp;amp;impid=-1&amp;amp;formatcnt=1&amp;amp;libid=5&amp;amp;typeid=-1&amp;amp;dateid=-1&amp;amp;formatid=-1&amp;amp;fileid=197400" target="_blank"&gt;Downloaded version 9.6.31.0, A02 of the Intel driver the from dell&lt;/a&gt; – this is from 2007, but it should be XP friendly (at this point pretty confident that’s what I need to be shooting for to make the WHS Restore software happy)&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Similarly, I extracted this install and copied the entire contents to my USB Flash Drive&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Afterwards, my Flash drive looked like this:     &lt;br /&gt;&lt;a href="http://blog.kellybrownsberger.com/____Uploads____/RestoringBaseImageofmyDellLatitudeE6400f_6E14/image_3.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.kellybrownsberger.com/____Uploads____/RestoringBaseImageofmyDellLatitudeE6400f_6E14/image_thumb_3.png" width="244" height="145" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I rebooted into the WHS Restore software, let is scan my Flash Drive, and it found one of these drivers!  After loading these drivers it was on my network and it could find my home server.  I’m not sure which driver it ended up loading, but it found one it like and I was able to continue with the restore wizard.  Within 13 minutes, my base image was restored to my solid state hard drive and my company laptop was ready for business.  The problem is solved, but now I’m late for work… gotta get in the shower!&lt;/p&gt;  &lt;p&gt;I hope this helps somebody else out there&lt;/p&gt;&lt;img src="http://blog.kellybrownsberger.com/aggbug/77.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>kellyb</dc:creator>
            <guid>http://blog.kellybrownsberger.com/archive/2010/02/09/77.aspx</guid>
            <pubDate>Tue, 09 Feb 2010 12:49:50 GMT</pubDate>
            <wfw:comment>http://blog.kellybrownsberger.com/comments/77.aspx</wfw:comment>
            <comments>http://blog.kellybrownsberger.com/archive/2010/02/09/77.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://blog.kellybrownsberger.com/comments/commentRss/77.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Using Fiddler - No connection could be made because the target machine actively refused it</title>
            <category>tools</category>
            <link>http://blog.kellybrownsberger.com/archive/2010/02/07/76.aspx</link>
            <description>&lt;p&gt;&lt;a target="_blank" href="http://www.fiddler2.com/fiddler2/"&gt;Fiddler&lt;/a&gt; is a great tool for inspecting HTTP traffic.  If you’re building a web services based application or AJAX intensive web application, you’ll need to check this out.  &lt;a target="_blank" href="http://www.fiddler2.com/fiddler2/"&gt;Fiddler&lt;/a&gt; has been around for a long time and there’s a lot of good content out on the net about how to use this.  There are several gotchas with this tool – like how it behaves with local addresses (i.e. localhost, 127.0.0.1, etc.).  Be sure to read up on all of that if you’re new to &lt;a target="_blank" href="http://www.fiddler2.com/fiddler2/"&gt;Fiddler&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One lesson I learned today while playing with the latest CTP of ADO.NET Data Services, is disable IPv6 in the Fiddler options.  Having this enabled seems to result in “Connection to localhost failed. Exception Text:  No connection could be made because the target machine actively refused it” errors for local addresses.  Like so:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.kellybrownsberger.com/____Uploads____/UsingFiddlerNoconnectioncouldbemadebecau_8C1F/image.png"&gt;&lt;img height="92" border="0" width="530" src="http://blog.kellybrownsberger.com/____Uploads____/UsingFiddlerNoconnectioncouldbemadebecau_8C1F/image_thumb.png" alt="image" title="image" style="border: 0px none; display: inline;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.kellybrownsberger.com/____Uploads____/UsingFiddlerNoconnectioncouldbemadebecau_8C1F/image_3.png"&gt;&lt;img height="412" border="0" width="885" src="http://blog.kellybrownsberger.com/____Uploads____/UsingFiddlerNoconnectioncouldbemadebecau_8C1F/image_thumb_3.png" alt="image" title="image" style="border: 0px none; display: inline;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Disable IPv6 in the Fiddler options seems to solve this.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.kellybrownsberger.com/____Uploads____/UsingFiddlerNoconnectioncouldbemadebecau_8C1F/image_4.png"&gt;&lt;img height="375" border="0" width="562" src="http://blog.kellybrownsberger.com/____Uploads____/UsingFiddlerNoconnectioncouldbemadebecau_8C1F/image_thumb_4.png" alt="image" title="image" style="border: 0px none; display: inline;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Looks good now:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.kellybrownsberger.com/____Uploads____/UsingFiddlerNoconnectioncouldbemadebecau_8C1F/image_5.png"&gt;&lt;img height="555" border="0" width="881" src="http://blog.kellybrownsberger.com/____Uploads____/UsingFiddlerNoconnectioncouldbemadebecau_8C1F/image_thumb_5.png" alt="image" title="image" style="border: 0px none; display: inline;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Hope this helps someone else out there&lt;/p&gt;&lt;img src="http://blog.kellybrownsberger.com/aggbug/76.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>kellyb</dc:creator>
            <guid>http://blog.kellybrownsberger.com/archive/2010/02/07/76.aspx</guid>
            <pubDate>Sun, 07 Feb 2010 14:58:32 GMT</pubDate>
            <wfw:comment>http://blog.kellybrownsberger.com/comments/76.aspx</wfw:comment>
            <comments>http://blog.kellybrownsberger.com/archive/2010/02/07/76.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.kellybrownsberger.com/comments/commentRss/76.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Please Vote: ChannelFactory Support in Silverlight</title>
            <link>http://blog.kellybrownsberger.com/archive/2010/02/03/75.aspx</link>
            <description>&lt;p&gt;&lt;a title="http://silverlight.codeplex.com/WorkItem/View.aspx?WorkItemId=5008&amp;amp;ProjectName=Silverlight" href="http://silverlight.codeplex.com/WorkItem/View.aspx?WorkItemId=5008&amp;amp;ProjectName=Silverlight"&gt;http://silverlight.codeplex.com/WorkItem/View.aspx?WorkItemId=5008&amp;amp;ProjectName=Silverlight&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blog.kellybrownsberger.com/aggbug/75.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>kellyb</dc:creator>
            <guid>http://blog.kellybrownsberger.com/archive/2010/02/03/75.aspx</guid>
            <pubDate>Wed, 03 Feb 2010 19:05:20 GMT</pubDate>
            <wfw:comment>http://blog.kellybrownsberger.com/comments/75.aspx</wfw:comment>
            <comments>http://blog.kellybrownsberger.com/archive/2010/02/03/75.aspx#feedback</comments>
            <wfw:commentRss>http://blog.kellybrownsberger.com/comments/commentRss/75.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Deploying ASP.NET MVC Apps to Shared Hosting Providers &amp;ndash; Webhost4life.com</title>
            <category>.net</category>
            <link>http://blog.kellybrownsberger.com/archive/2010/02/01/74.aspx</link>
            <description>&lt;p&gt;Are you getting 404’s on your deployed site when it works perfectly on your development machine?&lt;/p&gt;  &lt;p&gt;There’s a number of hidden gotchas when deploying an ASP.NET MVC application to a shared hosting providers.  My provider of choice is Webhost4life.com.  Here’s a list of issues I ran into and the solutions for each.&lt;/p&gt;  &lt;h4&gt;IIS 6.0 vs IIS 7.0&lt;/h4&gt;  &lt;p&gt;There’s a number of issues you need to be aware of here.  If you using IIS 6 -- and if you’re on Webhost4life there’s a good chance you are – then you need to make sure you’re virtual directory is configured w/ the “Wildcard application map” ISAPI setup that Phil talks about in his &lt;a href="http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx" target="_blank"&gt;ASP.NET MVC on IIS 6 Walkthrough&lt;/a&gt; post.  The short answer is – you have to contact Webhost4life to do this.  As of this writing, this is not available through their Control Panel.&lt;/p&gt;  &lt;h4&gt;MVC Binaries&lt;/h4&gt;  &lt;p&gt;As of this writing, Webhost4life.com does not have ASP.NET MVC installed on their servers and therefore none of the assemblies are installed in the GAC.  At a minimum, you need to bin deploy System.Web.Mvc.dll assembly.  Follow the instructions from Phil on how to do this in his post &lt;a href="http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx" target="_blank"&gt;Bin Deploying ASP.NET MVC&lt;/a&gt; – the abbreviated version is:  mark the references to MVC assemblies in your project as CopyLocal=true.&lt;/p&gt;  &lt;h4&gt;Route Setup&lt;/h4&gt;  &lt;p&gt;Make sure that your routes our setup in a way that jives with your domain.  In other words, make sure that &lt;a href="http://www.yourdomain.com/"&gt;http://www.yourdomain.com/&lt;/a&gt; will go to the proper route.  This is easy to overlook since your Startup Page in Visual Studio is set to something like /Site/Home while debugging. However, this isn’t how people are going to navigate to your site on your hosting provider.  In my case I setup routes with the code below.  This allows folks coming into my site via &lt;a href="http://yourdomain.com"&gt;http://yourdomain.com&lt;/a&gt; and &lt;a href="http://yourdomain.com/Site/Home"&gt;http://yourdomain.com/Site/Home&lt;/a&gt; to all end up in the same place&lt;/p&gt;  &lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; MvcApplication : System.Web.HttpApplication
    {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute(&lt;span class="str"&gt;"{resource}.axd/{*pathInfo}"&lt;/span&gt;);

            routes.MapRoute(&lt;span class="str"&gt;"Default"&lt;/span&gt;, &lt;span class="str"&gt;"{controller}/{action}/{id}"&lt;/span&gt;,  &lt;span class="kwrd"&gt;new&lt;/span&gt; { controller = &lt;span class="str"&gt;"Site"&lt;/span&gt;, action = &lt;span class="str"&gt;"Home"&lt;/span&gt;, id = &lt;span class="str"&gt;""&lt;/span&gt; });
            routes.MapRoute(&lt;span class="str"&gt;"Root"&lt;/span&gt;, &lt;span class="str"&gt;""&lt;/span&gt;, &lt;span class="kwrd"&gt;new&lt;/span&gt; { controller = &lt;span class="str"&gt;"Site"&lt;/span&gt;, action = &lt;span class="str"&gt;"Home"&lt;/span&gt;, id = &lt;span class="str"&gt;""&lt;/span&gt; } );
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Application_Start()
        {
            Global.RuntimeSettings = &lt;span class="kwrd"&gt;new&lt;/span&gt; RuntimeSettings {MachineName = &lt;span class="kwrd"&gt;base&lt;/span&gt;.Context.Server.MachineName};
            RegisterRoutes(RouteTable.Routes);
        }
    }&lt;/pre&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;h4&gt;Link Round Up&lt;/h4&gt;

&lt;p&gt;Here’s a list of things I found helpful when debugging this stuff&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://haacked.com/archive/2008/03/13/url-routing-debugger.aspx" target="_blank"&gt;ASP.NET Routing Debugger&lt;/a&gt;: Phil provides a debugging tool for routes&lt;/li&gt;

  &lt;li&gt;&lt;a href="http://forums.asp.net/p/1239943/2294813.aspx" target="_blank"&gt;ASP.NET Forum – How to deploy MVC app to shared hosting&lt;/a&gt;:  This is the post I ran across that connected all the dots for me and the Webhost4life.com tech support&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://blog.kellybrownsberger.com/aggbug/74.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>kellyb</dc:creator>
            <guid>http://blog.kellybrownsberger.com/archive/2010/02/01/74.aspx</guid>
            <pubDate>Mon, 01 Feb 2010 11:18:24 GMT</pubDate>
            <wfw:comment>http://blog.kellybrownsberger.com/comments/74.aspx</wfw:comment>
            <comments>http://blog.kellybrownsberger.com/archive/2010/02/01/74.aspx#feedback</comments>
            <wfw:commentRss>http://blog.kellybrownsberger.com/comments/commentRss/74.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>