<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html">Kennydust</title>
  <icon>http://kennydust.com/Content/icons/flame.ico</icon>
  <logo>http://kennydust.com/Content/icons/flame.png</logo>
  <updated>2010-03-02T18:39:00</updated>
  <subtitle type="html">Thoughts from a C# Developer</subtitle>
  <id>http://kennydust.com/site.aspx/atom</id>
  <link rel="alternate" type="text/html" hreflang="en" href="/site.aspx/atom"/>
  <link rel="self" type="application/atom+xml" href="http://kennydust.com/site.aspx/ATOM"/>
  <generator uri="http://oxite.net" version="1.0">Oxite</generator>
  <entry>
    <title type="html">Microsoft AJAX CDN for ASP.NET 3.5</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Microsoft-AJAX-CDN-for-ASPNET-35"/>
    <id>http://kennydust.com/site.aspx/Blog/Microsoft-AJAX-CDN-for-ASPNET-35</id>
    <updated>2010-03-03T16:58:47.873</updated>
    <published>2010-03-02T18:39:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="AJAX" />
    <category term="CDN" />
    <content type="html" xml:lang="en">
      &lt;p&gt;Late last year, &lt;a href=&quot;http://weblogs.asp.net/scottgu/archive/2009/09/15/announcing-the-microsoft-ajax-cdn.aspx&quot; target=&quot;_blank&quot;&gt;Microsoft announced&lt;/a&gt; the launch of their caching support service aka their &lt;a href=&quot;http://www.asp.net/ajaxlibrary/CDN.ashx&quot; target=&quot;_blank&quot;&gt;CDN service&lt;/a&gt;, for their ASP.NET AJAX libraries (and the third party jquery libraries) at no cost. Sweet!&lt;/p&gt;  &lt;p&gt;The problem was, you needed to be up-to-date on ASP.NET 4.0 framework stack in order to take advantage of it. Luckily, the community banned together in an uproar, and shortly thereafter a fix was released. While it’s practically plug-and-play if you’ve running ASP.NET 4.0, some custom code is required to get it to work correctly in the 3.5 framework. I ran across an excellent &lt;a href=&quot;http://blog.turlov.com/2009/11/using-microsoft-ajax-library-35-with.html&quot; target=&quot;_blank&quot;&gt;blog&lt;/a&gt; about this, and it details much more than I was looking for.&lt;/p&gt;  &lt;p&gt;To paraphrase, you need to define a &amp;lt;script&amp;gt; region in your scriptmanager instance and hardcode the CDN path, this will override the default local script reference location:&lt;/p&gt;  

&lt;pre class=&quot;brush: xml;&quot;&gt;
&lt;asp:scriptmanager runat=&quot;server&quot; enablepartialrendering=&quot;false&quot;&gt;
  &lt;scripts&gt;           
    &lt;asp:scriptreference name=&quot;MicrosoftAjax.js&quot; path=&quot;http://ajax.microsoft.com/ajax/3.5/MicrosoftAjax.js&quot; /&gt;
  &lt;/scripts&gt;  
&lt;/asp:ScriptManager&gt;
&lt;/pre&gt;

&lt;p&gt;I wanted to encapulate the logic a little better, so I wrote a small control that inherits the scriptmanager, and conditionally loads from the CDN, because I work without an internet connection at times:&lt;/p&gt;
&lt;pre class=&quot;brush: c#;&quot;&gt;
    public class CustomScriptManagerControl : ScriptManager
    {
        /// &lt;summary&gt;
        /// Microsoft Ajax 3.5 reference.
        /// &lt;/summary&gt;
        private const string CDN_PATH = &quot;http://ajax.microsoft.com/ajax/3.5/MicrosoftAjax.js&quot;;

        protected override void OnInit(EventArgs e)
        {

#if !DEBUG
            Scripts.Add(new ScriptReference { Name = &quot;MicrosoftAjax.js&quot;, Path = CDN_PATH });
#endif

            base.OnInit(e);
        }
    }
&lt;/pre&gt;

&lt;p&gt;this is called in my consuming page:&lt;/p&gt;
&lt;pre class=&quot;brush: xml;&quot;&gt;
&lt;c:CustomScriptManagerControl runat=&quot;server&quot; EnablePartialRendering=&quot;true&quot; /&gt;
&lt;/pre&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Developing iPhone apps in C# and .NET</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Developing-iPhone-apps-in-C-and-NET"/>
    <id>http://kennydust.com/site.aspx/Blog/Developing-iPhone-apps-in-C-and-NET</id>
    <updated>2009-10-28T21:53:49.737</updated>
    <published>2009-10-28T17:16:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="iphone" />
    <category term="CSharp" />
    <content type="html" xml:lang="en">
      &lt;p&gt;Last Month, Novell became the first provider to offer a &lt;a href=&quot;http://www.novell.com/news/press/novell-releases-first-solution-to-build-iphone-applications-using-c-and-microsoft-net-languages&quot; target=&quot;_blank&quot;&gt;solution&lt;/a&gt; for writing iPhone apps in the C# .NET stack. Being a C# Microsoft .NET developer, I immediately became excited -- but then I started reading about it, and my excitement soon soured; their offering is called &lt;a href=&quot;http://monotouch.net/&quot; target=&quot;_blank&quot;&gt;monotouch&lt;/a&gt;, and it costs $399 for a basic license – yikes! and it requires a mac for development (boooo). Give me something I can use, please. &lt;/p&gt; &lt;p&gt;There is an &lt;a href=&quot;http://monotouch.net/DownloadTrial&quot; target=&quot;_blank&quot;&gt;evaluation version&lt;/a&gt;, but it’s limited to development on an iPhone simulator though. Not sure on how many days you can “evaulate” the product for however.&lt;/p&gt;  &lt;p&gt;Prior to, iPhone app development was limited to complex c and Object-c on the mac, using&amp;#160; &lt;a href=&quot;http://developer.apple.com/iphone/&quot; target=&quot;_blank&quot;&gt;Apple’s iPhone SDK&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://mono-project.com/files/thumb/b/b4/180px-Monocatalog.png&quot; alt=&quot;iPhone&quot;/&gt;&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Visual Studio 2008: Clean up your “Recent Projects Sidebar”</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Visual-Studio-2008-Clean-up-your-Recent-Projects-Sidebar"/>
    <id>http://kennydust.com/site.aspx/Blog/Visual-Studio-2008-Clean-up-your-Recent-Projects-Sidebar</id>
    <updated>2009-10-14T17:01:54.22</updated>
    <published>2009-10-14T12:57:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="VisualStudio" />
    <content type="html" xml:lang="en">
      &lt;p&gt;As a developer, you create many projects and open many more third party projects files over the course of your development career. In doing so however, your “Recent Projects” sidebar in the startpage in VS 2008 becomes cluttered with some things that end up being temporary anyways. Here’s how to clean it up:&lt;/p&gt;  &lt;p&gt;Open regedit.&lt;/p&gt;  &lt;p&gt;Navigate through the registry to this spot: 

&lt;pre class=&quot;brush: text;&quot;&gt;
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\ProjectMRUList
&lt;/pre&gt;

&lt;/p&gt;  

&lt;p&gt;and you’ll see a list that looks similar to this:&lt;/p&gt;  

&lt;pre class=&quot;brush: text;&quot;&gt;
File1 Reg_Expand_Sx Path
File2 Reg_Expand_Sx Path 
File3 Reg_Expand_Sx Path
File4 Reg_Expand_Sx Path
&lt;/pre&gt;
&lt;p&gt;You need to delete the values you don’t want, and then rename all the remaining ones (that you want to keep) in sequential order, while ensuring there are no gaps in between.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Lambda Expressions</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Lambda-Expressions"/>
    <id>http://kennydust.com/site.aspx/Blog/Lambda-Expressions</id>
    <updated>2009-08-06T21:17:23.75</updated>
    <published>2009-08-05T15:11:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="Code" />
    <category term="CSharp" />
    <category term="DotNet" />
    <content type="html" xml:lang="en">
      &lt;p&gt;This just in: &lt;a href=&quot;http://weblogs.asp.net/scottgu/archive/2007/04/08/new-orcas-language-feature-lambda-expressions.aspx&quot; target=&quot;_blank&quot;&gt;Lambda Expressions&lt;/a&gt; are cool.&lt;/p&gt;  &lt;p&gt;Yes, I'm a tad late, given that this language feature has been around for some time (introduced originally in .net 3.0, and packaged in .net 3.5). But to my defense, I have these reasons: (1) There wasn’t a need for it on my end, (2) I was working in a .net 2.0 shop, (3) There were so many feature enhancements that this particular one flew under the radar.&lt;/p&gt;  &lt;p&gt;Fast forward to today, I've written my first lambda expression and wish to share it.&lt;/p&gt;  
&lt;p&gt;So what are lambda expressions? In my own words, they are just another way of writing code statements; a shorthand way of encapsulating logic. They can be &quot;expressions&quot; and &quot;statements&quot;, and can be assigned to a delegate type. A lambda expression contains a &quot;lambda operator,&quot; =&gt;, with the left side of the expression responsible for handling input and the right side containing logic:&lt;/p&gt;

&lt;pre class=&quot;brush: c-sharp;&quot;&gt;
  //assuming x equates to a value of 10
  x =&gt; x + x;

  (10) =&gt; (10) + (10) //equals 20
&lt;/pre&gt;

&lt;p&gt; Below are a few examples I've put together, they are pretty simplified, but it demonstrates how powerful lambda expressions can be. The challenge? Given some DateTime value, perform a comparison to see whether or not this value has exceeded 24 hours.&lt;/p&gt;  

&lt;p&gt;To start, here’s the original snippet that was coded up.&lt;/p&gt;  

&lt;pre class=&quot;brush: c-sharp;&quot;&gt;
DateTime expiredTime = DateTime.Parse(&quot;1/1/2009&quot;); 
DateTime adjustedTime = DateTime.Now.AddHours(-24);

//original statement 
int comparsionResult = DateTime.Compare(adjustedTime, expiredTime); 
bool isExpired = (comparsionResult &amp;gt; 0);
&lt;/pre&gt;

&lt;p&gt;It's pretty straight forward and it does the job. But we want lambda expressions. Here's an example of that, with an expression that's assigned to a delegate type that expects one input:&lt;/p&gt;

&lt;pre class=&quot;brush: c-sharp;&quot;&gt;
delegate bool del(DateTime t); 
static void Main(string[] args)
{
   DateTime expiredTime = DateTime.Parse(&quot;1/1/2009&quot;); 
   DateTime adjustedTime = DateTime.Now.AddHours(-24);

   del comparisonDel = x =&gt; (DateTime.Compare(adjustedTime, x) &gt; 0);
   bool isExpired = comparisonDel(expiredTime);
}
&lt;/pre&gt;


&lt;p&gt;The second example demostrates wrapping a lambda expression in a Func&lt;&gt; generic delegate.&lt;/p&gt;
&lt;pre class=&quot;brush: c-sharp;&quot;&gt;
DateTime expiredTime = DateTime.Parse(&quot;1/1/2009&quot;); 
DateTime adjustedTime = DateTime.Now.AddHours(-24);

 //Lambda Expression Wrapped in a Func&lt;&gt;
Func&lt;DateTime, bool&gt; ComparisonCheck = x =&gt; (DateTime.Compare(adjustedTime, x) &gt; 0);
bool isExpired = ComparisonCheck(expiredTime);
&lt;/pre&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Windows Vista and the permissions prompts</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Windows-Vista-and-the-run-as-administrator-prompts"/>
    <id>http://kennydust.com/site.aspx/Blog/Windows-Vista-and-the-run-as-administrator-prompts</id>
    <updated>2009-07-29T19:53:58.397</updated>
    <published>2009-07-28T18:23:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="vista" />
    <category term="security" />
    <category term="administrator" />
    <content type="html" xml:lang="en">
      &lt;p&gt;For all of you vista users... are you sick of this?&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/downloads/user_account_control.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Chances are, you are; for Vista throws up security prompts for the all programs they classify as a security risk. I know I get pretty frustrated at times, and I’m considered an “Administrator” of my own machine.&lt;/p&gt;  &lt;p&gt;Here’s a &lt;a href=&quot;http://www.vistax64.com/tutorials/80938-user-account-control-uac-elevate-privilege-level.html&quot; target=&quot;_blank&quot;&gt;helpful link&lt;/a&gt; to make those prompts disappear.&lt;/p&gt;  &lt;p&gt;HTH&lt;/p&gt;  &lt;p&gt;-Kennydust&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">From Graffiti to Oxite</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/From-Graffiti-to-Oxite"/>
    <id>http://kennydust.com/site.aspx/Blog/From-Graffiti-to-Oxite</id>
    <updated>2010-01-13T21:30:58.51</updated>
    <published>2009-06-12T13:41:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="graffiticms" />
    <category term="microsoft" />
    <category term="oxite" />
    <category term="mvc" />
    <content type="html" xml:lang="en">
      &lt;p&gt;&lt;/p&gt;  &lt;p&gt;So I've moved off of &lt;a href=&quot;http://graffiticms.com/&quot; target=&quot;_blank&quot;&gt;Graffiti CMS&lt;/a&gt; and migrated my blog posts (via BlogML) to &lt;a href=&quot;http://oxite.codeplex.com/&quot; target=&quot;_blank&quot;&gt;Oxite&lt;/a&gt; -- Microsoft's open source blogging platform. &lt;/p&gt;  &lt;p&gt;As much as I wanted to love Graffiti, I wasn't a huge fan of VistaDB; I've even heard rumors that the product's been dropped by Telligent earlier this year. But mainly as a developer, what I really wanted was full control -- so switching to Oxite seemed like a natural progression.. and it's packed with lots of goodies -- including &lt;a href=&quot;http://www.asp.net/mvc/&quot; target=&quot;_blank&quot;&gt;MVC&lt;/a&gt;, &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/cc468366.aspx&quot; target=&quot;_blank&quot;&gt;Unity&lt;/a&gt; and &lt;a href=&quot;http://www.codeplex.com/AntiXSS&quot; target=&quot;_blank&quot;&gt;AntiXSS&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;It wouldn't be a good product without all the problems, so getting started was a bit challenging. Right off the bat, there were 404 errors all over the place -- and found out that the application requires a special URL prefix in order for it to work in IIS6. &lt;/p&gt;  

&lt;img src=&quot;/files/media/image/WindowsLiveWriter/GraffitiToOxite/siteaspx.jpg&quot; style=&quot;border: 1px solid #000;&quot; /&gt;
&lt;p&gt;Shortly thereafter I started witnessing permission issues when referencing one of the third party assembly. But no big deal, downloaded the source, marked that assembly.info file with the AllowPartiallyTrustedCallersAttribute and I was up and running.&lt;/p&gt;  &lt;p&gt;Since I'm on this new platform, will this mean more posts in the future? I'm not so sure, but I'll certainly have a reason to play with the MVC framework now:) I am rather disappointed that images cannot be posted through the metaweblog API at the moment, looks like I'll have to manually move them over (like I did for this post). &lt;/p&gt;

&lt;p&gt;
Non oxite users that are having issues with II6 and MVC should read this &lt;a href=&quot;http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx&quot;&gt;blog post&lt;/a&gt;.
&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Dancing around with XQuery and SQL Server - Part 2</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Dancing-around-with-XQuery-and-SQL-Server-Part-2"/>
    <id>http://kennydust.com/site.aspx/Blog/Dancing-around-with-XQuery-and-SQL-Server-Part-2</id>
    <updated>2009-08-05T21:45:52.453</updated>
    <published>2009-06-04T14:56:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="SQLServer" />
    <content type="html" xml:lang="en">
      &lt;p&gt;This is a follow up on a &lt;a target=&quot;_self&quot; href=&quot;http://kennydust.com/tech/sql/dancing-around-with-xquery-and-sql-server-part-1/&quot;&gt;prior post&lt;/a&gt; I've made a few months back on XQuery, with the purpose of this post to just show a few more examples on how powerful XML and XQuery can be -- with no additional overhead costs.&amp;nbsp; If implemented correctly, you can even get better performance gains; but I'll possibly discuss that in a future offering. For this segment, I wanted to&amp;nbsp;document the common usages I've come across lately, and refer to it later on as a refresher.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 1&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;So, you've got xml data, and the structure looks as such:&lt;/p&gt;
&lt;pre class=&quot;brush: xml;&quot;&gt;
&lt;metadata&gt;
    &lt;item&gt;
        &lt;key&gt;key1&lt;/key&gt;
        &lt;value&gt;value1&lt;/value&gt;
    &lt;/item&gt;
    &lt;item&gt;
        &lt;key&gt;key2&lt;/key&gt;
        &lt;value&gt;value2&lt;/value&gt;
    &lt;/item&gt;
&lt;/metadata&gt;
&lt;/pre&gt;
&lt;p&gt;To query this data, we do something like this:&lt;/p&gt;

&lt;pre class=&quot;brush: sql;&quot;&gt;
declare @xml xml
set @xml = N'
&lt;metadata&gt;
&lt;item&gt;&lt;key&gt;key1&lt;/key&gt;&lt;value&gt;value1&lt;/value&gt;&lt;/item&gt;
&lt;item&gt;&lt;key&gt;key2&lt;/key&gt;&lt;value&gt;value2&lt;/value&gt;&lt;/item&gt;
&lt;item&gt;&lt;key&gt;key3&lt;/key&gt;&lt;value&gt;value3&lt;/value&gt;&lt;/item&gt;&lt;/metadata&gt;
'
select 
metadata.[item].value('key[1]', 'nvarchar(25)') as [key],
metadata.[item].value('value[1]', 'nvarchar(max)') as [value],
metadata.[item].value('value[1]', 'nvarchar(25)') as [valueShort]
from @xml.nodes('/metadata/item') metadata ([item])

&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Results&lt;/strong&gt;:&lt;/p&gt;
&lt;pre class=&quot;brush: plain;&quot;&gt;
key                       value                     valueShort
------------------------- ------------------------- -------------------------
key1                      value1                    value1
key2                      value2                    value2
key3                      value3                    value3

(3 row(s) affected)


&lt;/pre&gt;


&lt;p&gt;&lt;strong&gt;Example 2&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;If you're an attribute guy (or gal), here's one that'll work too:&lt;/p&gt;

&lt;pre class=&quot;brush: sql;&quot;&gt;
declare @xml xml
set @xml = N'
&lt;metadata&gt;
&lt;item key=&quot;key1&quot; value=&quot;value1&quot; /&gt;
&lt;item key=&quot;key2&quot; value=&quot;value2&quot; /&gt;
&lt;item key=&quot;key3&quot; value=&quot;value3&quot; /&gt;
&lt;/metadata&gt;
'

select metadata.[item].query('data(@key)').value('.', 'nvarchar(25)') as [key]
,metadata.[item].query('data(@value)').value('.', 'nvarchar(max)') as [value]
,metadata.[item].query('data(@value)').value('.', 'nvarchar(25)') as [valueshort]
from @xml.nodes('/metadata/item') metadata ([item])
&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Results&lt;/strong&gt;:&lt;/p&gt;
&lt;pre class=&quot;brush: plain;&quot;&gt;
key                       value                     valueshort
------------------------- ------------------------- -------------------------
key1                      value1                    value1
key2                      value2                    value2
key3                      value3                    value3

(3 row(s) affected)

&lt;/pre&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Kennydust&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Visual Studio 2008: Tracking active item in the Solution Explorer</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Visual-Studio-2008-Tracking-active-item-in-the-Solution-Explorer"/>
    <id>http://kennydust.com/site.aspx/Blog/Visual-Studio-2008-Tracking-active-item-in-the-Solution-Explorer</id>
    <updated>2009-06-12T04:08:41.733</updated>
    <published>2009-05-20T13:04:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="VisualStudio" />
    <content type="html" xml:lang="en">
      &lt;p&gt;I've recently made the switch to VS 2008 and noticed that the active file is not highlighted in the docked solution explorer. Being that I work with multiple projects and countless hundreds of class files -- this became somewhat cumbersome; it's necessary for me refer to the file hierarchy and the current project 30% of the time. After some digging around, I discovered that VS 2008 does not enable this feature by default (this was the case for VS 2005); In order to fix this, you need to go into the Tools -&amp;gt; Options -&amp;gt; Projects and Solutions and check off the following:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://kennydust.com/files/media/image/WindowsLiveWriter/VisualStudio2008TrackingactiveitemintheS_B7A7/focus_4.png&quot;&gt;&lt;img style=&quot;border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px&quot; height=&quot;252&quot; alt=&quot;focus&quot; width=&quot;508&quot; border=&quot;0&quot; src=&quot;http://kennydust.com/files/media/image/WindowsLiveWriter/VisualStudio2008TrackingactiveitemintheS_B7A7/focus_thumb_1.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Facebook Connect -- for the iPhone</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Facebook-Connect-for-the-iPhone"/>
    <id>http://kennydust.com/site.aspx/Blog/Facebook-Connect-for-the-iPhone</id>
    <updated>2009-06-12T04:08:41.497</updated>
    <published>2009-03-18T14:55:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="ThirdParty" />
    <content type="html" xml:lang="en">
      &lt;p&gt;Facebook is stretching their limits of their social reach beyond the web, and onto your iphone. Now, custom apps can be facebook aware, and allow&amp;nbsp;for iphone owners to log-in&amp;nbsp;to facebook, leveraging the facebook connect service.&lt;/p&gt;
&lt;p&gt;For those of you who are not familiar with facebook connect, the original offering was web based&amp;nbsp;only;&amp;nbsp;conceived sometime last year and it allowed any web site to have some user integration with facebook, while allowing access to it's social features via it's API and proprietary markup language. Now with an iPhone offering, it gives the user more reason to stay on the very popular social networking site -- even without being on the social networking site.&lt;/p&gt;
&lt;p&gt;More information about &lt;a target=&quot;_blank&quot; href=&quot;http://developers.facebook.com/connect.php&quot;&gt;facebook connect here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you are interested in developing iPhone applications leveraging facebook connect, here is the &lt;a target=&quot;_blank&quot; href=&quot;http://svn.facebook.com/svnroot/platform/clients/packages/fbconnect-iphone.zip&quot;&gt;link to their starter kit&lt;/a&gt;. Documentation &lt;a target=&quot;_blank&quot; href=&quot;http://wiki.developers.facebook.com/index.php/Facebook_Connect_for_iPhone&quot;&gt;link is here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class=&quot;wlWriterSmartContent&quot; id=&quot;scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:05984887-5da5-4975-a255-d9504c56df1d&quot; style=&quot;padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px&quot;&gt;
&lt;div&gt;&lt;object width=&quot;400&quot; height=&quot;225&quot;&gt;&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt;&lt;param name=&quot;movie&quot; value=&quot;http://vimeo.com/moogaloop.swf?clip_id=3616452&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1&quot; /&gt;&lt;embed src=&quot;http://vimeo.com/moogaloop.swf?clip_id=3616452&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;always&quot; width=&quot;400&quot; height=&quot;225&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;a href=&quot;http://vimeo.com/3616452&quot;&gt;How To: Implement Facebook Connect on the iPhone in 5 minutes&lt;/a&gt; from &lt;a href=&quot;http://vimeo.com/user1326423&quot;&gt;Cat Lee&lt;/a&gt; on &lt;a href=&quot;http://vimeo.com&quot;&gt;Vimeo&lt;/a&gt;.&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Read the original announcement on their &lt;a target=&quot;_blank&quot; href=&quot;http://developers.facebook.com/news.php?blog=1&amp;amp;story=213&quot;&gt;developer blog&lt;/a&gt;.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Commenting with Facebook's standalone widget</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Commenting-with-Facebooks-standalone-widget"/>
    <id>http://kennydust.com/site.aspx/Blog/Commenting-with-Facebooks-standalone-widget</id>
    <updated>2010-01-14T18:17:51.713</updated>
    <published>2009-02-23T20:25:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="ThirdParty" />
    <content type="html" xml:lang="en">
      &lt;p&gt;Last week, Facebook &lt;a target=&quot;_blank&quot; href=&quot;http://developers.facebook.com/news.php?blog=1&amp;amp;story=198&quot;&gt;released it's new Comment Box social&amp;nbsp;widget&lt;/a&gt; which allows a developer to add&amp;nbsp;threaded comment&amp;nbsp;functionality to any site they want. It literally took me less than 5 minutes to slap it all together; and maybe if I didn't read stop to read all the itty bitty details, it probably would of taken me half that time. I must say, I'm pretty impressed -- it integrates well with my own site, and it looks slick. Facebook's widget&amp;nbsp;allows allows for anonymous comments, so you don't necessarily need to be facebook user in order to submit your 2 cents.&lt;/p&gt;
&lt;p&gt;So wow, I'm pretty excited, if that isn't pretty obvious. Also included in the widget is a fully functional administration tool to remove comments, blacklist users and all sorts of fun stuff. The developer can also limit the posts per page and further customizations via the &lt;a target=&quot;_blank&quot; href=&quot;http://wiki.developers.facebook.com/index.php/Fb:comments_%28XFBML%29&quot;&gt;XFBML spec&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Check it out, just scroll to the bottom to see their comment interface. Leave a comment if you wish too.&lt;/p&gt;
&lt;p&gt;&lt;object width=&quot;400&quot; height=&quot;225&quot;&gt;&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt;&lt;param name=&quot;movie&quot; value=&quot;http://vimeo.com/moogaloop.swf?clip_id=3289354&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1&quot; /&gt;&lt;embed src=&quot;http://vimeo.com/moogaloop.swf?clip_id=3289354&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;always&quot; width=&quot;400&quot; height=&quot;225&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://vimeo.com/3289354&quot;&gt;How To: Create a Comments Box with Facebook Connect in 5 Minutes&lt;/a&gt; from &lt;a href=&quot;http://vimeo.com/user1326554&quot;&gt;Pete Bratach&lt;/a&gt; on &lt;a href=&quot;http://vimeo.com&quot;&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;

EDIT (1/14/2010): Here's the &lt;a href=&quot;http://wiki.developers.facebook.com/index.php/Comments_Box&quot;&gt;link to the Comment's box wiki&lt;/a&gt; for more advance settings and parameters. One issue I ran into was getting the box to render, but thats only because facebook requires a valid callback URL.
    </content>
  </entry>
  <entry>
    <title type="html">Validation Application Block</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Validation-Application-Block"/>
    <id>http://kennydust.com/site.aspx/Blog/Validation-Application-Block</id>
    <updated>2009-08-05T21:54:50.75</updated>
    <published>2009-02-18T20:16:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="Code" />
    <content type="html" xml:lang="en">
      &lt;p&gt;How many hours during the day do you sit around and write validation code?&amp;nbsp; Way to many to count, if I'm reading your mind. Validation is pretty common it's in usage that it occurred to me that I needed some sort of compact way of encapsulating rules and business logic. So on my train ride home, I thought to myself -- &amp;quot;Gee, I guess I could create validation attributes, and decorate my properties!&amp;quot; I really thought I was brilliant, and somewhat innovative, but lo and behold, I get home and discover there's already an application block written for just that purpose. So I'm going to entertain myself by writing a use case for this, and post code at the end.&lt;/p&gt;
&lt;p&gt;Here's the beauty of the application block: It's flexible. You can decorate your class entities with validation attributes, or validate primitive data types or objects. You can also set up rules via XML, and there's support for ASP.NET, Windows Forms and WCF.&lt;/p&gt;
&lt;p&gt;Here's what we would do traditionally:&lt;/p&gt;

&lt;pre class=&quot;brush: c-sharp;&quot;&gt;

if (String.IsNullOrEmpty(Textbox1.Text))
{
    throw new ArgumentNullException(&quot;No text specified!!&quot;);
} else {

    Foo f = new Foo();
    f.bar = TextBox1.Text;
}


&lt;/pre&gt;
&lt;p&gt;Here's how we can solve that with the VAB in code:&lt;/p&gt;

&lt;pre class=&quot;brush: c-sharp;&quot;&gt;

StringValidator v = new StringValidator(1, 10);
v.Validate(Textbox1.Text);

//validator would blow up if invalid.. and not execute the next line
Foo f = new Foo();
f.bar = Textbox1.Text;



&lt;/pre&gt;

&lt;p&gt;Here's an alternative way by decorating the property with an attribute:&lt;/p&gt;

&lt;pre class=&quot;brush: c-sharp;&quot;&gt;

public class Foo
{
    [StringLengthValidator(1, 50)]
    public string bar
    {
        get;set;
    }
}



&lt;/pre&gt;

&lt;p&gt;This is a very simple usage pattern for what the block can really do; there are Validators that can compare dates, enums and even perform regular expressions. Additionally, you can write you own custom validators, and define more finite rules either inline or using configuration files via XML. It really depends on your business requirements and how crazy you want to extend it. But the point is, you no longer need to stick logic in your website tier.. there's already a framework available that should save your some time.&lt;/p&gt;
&lt;p&gt;Here's more information on VAB:&lt;/p&gt;
&lt;p&gt;&lt;a title=&quot;http://msdn.microsoft.com/en-us/library/dd140088.aspx&quot; target=&quot;_blank&quot; href=&quot;http://msdn.microsoft.com/en-us/library/dd140088.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/dd140088.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Download FAB; You can get it as part of the entire Enterprise library that Microsoft releases every now and then:&lt;/p&gt;
&lt;p&gt;&lt;a title=&quot;http://msdn.microsoft.com/en-us/library/cc467894.aspx&quot; target=&quot;_blank&quot; href=&quot;http://msdn.microsoft.com/en-us/library/cc467894.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/cc467894.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can &lt;a target=&quot;_blank&quot; href=&quot;http://rendermedia.com/downloads/validationweb.zip&quot;&gt;download my sourcecode example here&lt;/a&gt;. Basically the example is a webform for entering your pet information, it performs validation via inline code and makes use of validation attributes. I'm using the Enterprise Library 3.1 - May 2007 version, only because I need .NET framework 2.0 support.&lt;/p&gt;
&lt;p&gt;Happy Coding.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">So you want to want HTTP Modules and Handlers working with Vista and IIS7, huh?</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/So-you-want-to-want-HTTP-Modules-and-Handlers-working-with-Vista-and-IIS7"/>
    <id>http://kennydust.com/site.aspx/Blog/So-you-want-to-want-HTTP-Modules-and-Handlers-working-with-Vista-and-IIS7</id>
    <updated>2009-06-12T04:08:40.717</updated>
    <published>2009-02-16T16:01:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="Windows" />
    <content type="html" xml:lang="en">
      &lt;p&gt;HTTP Handlers and modules are necessary components for any given web app. While it's conceivable that a developer may never develop a Handler/Module ever, there may be legacy handlers/modules that may exist or third party applications that requires to use them. More information on &lt;a target=&quot;_blank&quot; href=&quot;http://msdn.microsoft.com/en-us/library/bb398986.aspx&quot;&gt;Handlers and Modules here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So recently, I ran into an issue where all of my old .ashx and custom handlers blew up when running under IIS. I had upgraded to Vista from XP and being that the web application was dependant upon alot of Handler calls, this proved to be the latest challenge in the life of my Vista tenure.&lt;/p&gt;
&lt;p&gt;First off, II7 is &lt;strong&gt;not&lt;/strong&gt; enabled by default with your copy of the Windows Vista. Keeping in mind you'll probably need to research a bit to see if II7 even comes with your flavor of Vista, being that some versions don't have IIS packaged with that build; I've got the ultimate edition, so I'm in the clear (for now).&lt;/p&gt;
&lt;p&gt;To enable II7: follow these &lt;a target=&quot;_blank&quot; href=&quot;http://www.howtogeek.com/howto/windows-vista/how-to-install-iis-on-windows-vista/&quot;&gt;instructions in this link&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Make sure that you've checked off all or most the following feature-sets from: &lt;strong&gt;Internet Information Services&lt;/strong&gt; &amp;gt; &lt;strong&gt;World Wide Web Services&lt;/strong&gt; &amp;gt; &lt;strong&gt;Application Development Features&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://kennydust.com/files/media/image/WindowsLiveWriter/SoyouwanttowantHTTPModulesandHandlerswor_E148/iis7_aspnetconf_2.jpg&quot;&gt;&lt;img style=&quot;border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px&quot; height=&quot;417&quot; alt=&quot;iis7_aspnetconf&quot; width=&quot;338&quot; border=&quot;0&quot; src=&quot;http://kennydust.com/files/media/image/WindowsLiveWriter/SoyouwanttowantHTTPModulesandHandlerswor_E148/iis7_aspnetconf_thumb.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Enabling those features (.NET Extensibility, ASP, ASP.NET, ISAPI Extensions, ISAPI Filters, SSI) ensures that your instance of II7 has more options when you are ready to configure your website even further (in particularly, the Handlers and Modules Mappings).&lt;/p&gt;
&lt;p&gt;After you've gotten that done, follow &lt;a target=&quot;_blank&quot; href=&quot;http://bdotnet.in/blogs/navaneeth/archive/2008/07/06/2056.aspx&quot;&gt;these instructions&lt;/a&gt; to get your handlers and modules working.&lt;/p&gt;
&lt;p&gt;HTH&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Dancing around with XQuery and SQL Server - Part 1</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Dancing-around-with-XQuery-and-SQL-Server-Part-1"/>
    <id>http://kennydust.com/site.aspx/Blog/Dancing-around-with-XQuery-and-SQL-Server-Part-1</id>
    <updated>2009-08-05T21:57:56.627</updated>
    <published>2009-02-12T16:32:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="SQLServer" />
    <content type="html" xml:lang="en">
      &lt;p&gt;What's XQuery? It's a language backed by the W3C to standardize querying XML.&lt;/p&gt;
&lt;p&gt;Why XQuery? Microsoft started offering support for it in SQL Server 2000 and in SQL Server 2005, extended it with more support with the introduction of the XML data type column. It's fast, it's compact, and you don't need to add 10 million trivial columns. You just add one XML column and stick raw XML in there. It's that easy, a caveman can do it. Here's more information about &lt;a target=&quot;_blank&quot; href=&quot;http://msdn.microsoft.com/en-us/library/ms345122(SQL.90).aspx&quot;&gt;Microsoft and XQuery&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So what's the bad news? It's yet another language to learn and the syntax is pretty cryptic for simple operations. For those developers that aren't DBA's, it's likely you won't be touching this very often. So since this came up at work, I'm writing part one of XQuery so I can refer back to it at some point in the future when I know I'll be using it once again.&lt;/p&gt;
&lt;p&gt;So I've got a table with an XML data type in one of the columns.&lt;/p&gt;

&lt;pre class=&quot;brush: sql;&quot;&gt;

CREATE TABLE [dbo].[User](
    [UserID] [uniqueidentifier] NOT NULL,
    [WebAddressName] varchar(100) NOT NULL,
    [Properties] [xml] NULL
) ON [PRIMARY]



&lt;/pre&gt;

&lt;p&gt;In the Properties XML data type column, I've got a few rows... and the XML looks like this:&lt;/p&gt;
&lt;pre class=&quot;brush: xml;&quot;&gt;

&lt;properties&gt;
  &lt;property key=&quot;SessionID&quot;&gt;2.iiDhbDmiWSt4UA5CJWRDzg__.3600.1234461600-625164376&lt;/property&gt;
  &lt;property key=&quot;DisplayName&quot;&gt;Kenny Lai&lt;/property&gt;
  &lt;property key=&quot;SquarePictureUrl&quot;&gt;http://kennydust.com/v227/1279/94/q625164376_5201.jpg&lt;/property&gt;
  &lt;property key=&quot;LastProfilePush&quot;&gt;2/12/2009 4:38:47 PM&lt;/property&gt;
  &lt;property key=&quot;Created&quot;&gt;12/30/2008 8:27:54 PM&lt;/property&gt;
&lt;/properties&gt;


&lt;/pre&gt;

&lt;p&gt;So imagine we've got a couple of thousand records. I just need one record with the DisplayName = &amp;quot;Kenny Lai&amp;quot;. How do I grab that row?&lt;/p&gt;

&lt;pre class=&quot;brush: sql;&quot;&gt;

declare @Key varchar(50)
set @Key ='Kenny Lai'

SELECT * FROM User
WHERE [properties].exist('/properties/property/text()[contains(.,sql:variable(&quot;@Key&quot;))]') = 1



&lt;/pre&gt;

&lt;p&gt;So there you have it, there are other techniques and ways to get more granular with your data, including targeting attributes and whatnot -- but this is the simplest way for the goal that I needed to achieve.&lt;/p&gt;
&lt;p&gt;Happy coding.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">StringDictionary will lower your keys (and your expectations)</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/StringDictionary-will-lower-your-keys-and-your-expectations"/>
    <id>http://kennydust.com/site.aspx/Blog/StringDictionary-will-lower-your-keys-and-your-expectations</id>
    <updated>2009-06-12T04:08:40.14</updated>
    <published>2009-02-02T17:53:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="Code" />
    <content type="html" xml:lang="en">
      &lt;p&gt;I needed to store a collection of key/value strings, so I turned to a familiar class I've used in the past: System.Collections.Specialized.StringDictionary. It's pretty straightforward to use, you construct it, then add your items one at a time. However, I ran into some pretty odd behavior where all the keys I injected came back out lower cased.. and subsequently, blew up into a nice error screen because some of the underlining code was dependant on specifically cased key strings.&lt;/p&gt;
&lt;p&gt;According to &lt;a target=&quot;_blank&quot; href=&quot;http://msdn.microsoft.com/en-us/library/system.collections.specialized.stringdictionary.aspx&quot;&gt;microsoft&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The key is handled in a case-insensitive manner; it is translated to lowercase before it is used with the string dictionary.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;WTF? There doesn't seem to be any way around it. And I don't see any overloads (StringDictionary has just an empty ctor) or properties to set to override this behavior.. so I may need to find another solution. Microsoft should at least give the developer the option to control how the keys, or values are normalized.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/em&gt;: as I was about to submit this entry, I found this blog entry from &lt;a target=&quot;_blank&quot; href=&quot;http://haacked.com/archive/2004/06/25/685.aspx&quot;&gt;haack boy&lt;/a&gt;. I've resorted to using Dictionary&amp;lt;string, string&amp;gt;.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Preventing TinyMCE from stripping embed tags from rich media code.</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Preventing-TinyMCE-from-stripping-embed-tags-from-rich-media-code"/>
    <id>http://kennydust.com/site.aspx/Blog/Preventing-TinyMCE-from-stripping-embed-tags-from-rich-media-code</id>
    <updated>2009-08-05T22:10:22.97</updated>
    <published>2008-12-12T17:03:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="ThirdParty" />
    <content type="html" xml:lang="en">
      &lt;p&gt;For those who have never used the TinyMCE WYSIWYG pluggin, it's one of the industry's best kept secret; add this pluggin to your website, and you've got an instant Microsoft Word-like interface that supports pretty much all the different browsers and it's variations. Some of the things I've taken advantage of include creating custom toolbar buttons and leveraging their compressor paradigm to keep the scripts lightweight. Pretty neat indeed.&lt;/p&gt;
&lt;p&gt;Now with that said, I've come across one issue which wasn't very clear initially on how to solve, because it had long been a bug since it's predecessor versions; I was inject YouTube object/embed code into the body of the TinyMCE editor -- and coming back out, the &amp;lt;embed&amp;gt; tag would be stripped out entirely. It was a little odd, and I tried a number of things to no avail. The solution? Define &lt;strong&gt;media_strict = false&lt;/strong&gt; in your init() call. But only if you're utilizing the media pluggin. The media plugin assumes &lt;strong&gt;media_strict&lt;/strong&gt; is true by default. The &lt;strong&gt;media_strict&lt;/strong&gt; is a new option as of version 3.2.1.&lt;/p&gt;


&lt;pre class=&quot;brush: js;&quot;&gt;

tinyMCE.init({
   mode: &quot;textareas&quot;,
   theme : &quot;advanced&quot;,
   plugins : &quot;media&quot;,
   media_strict : false
});

&lt;/pre&gt;

&lt;p&gt;Hope this saves someone a day or two.&lt;/p&gt;
&lt;p&gt;&lt;a title=&quot;submit to globalgrind&quot; href=&quot;javascript:(function() { window.location = 'http://staging.globalgrind.com/submission/test.aspx?pid=1&amp;amp;url='+encodeURIComponent(window.location)+'&amp;amp;type=Article&amp;amp;description=placeholderfornow&amp;amp;title='+encodeURIComponent('Preventing TinyMCE from stripping &amp;lt;embed&amp;gt; tags from rich media code.'); })();&quot;&gt;&lt;img height=&quot;16&quot; alt=&quot;Add to GlobalGrind!&quot; width=&quot;16&quot; border=&quot;0&quot; src=&quot;http://globalgrind.com/images/badges/btn_badge1_dark.gif&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Remote Server Administrator Tools (RSAT) for Vista</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Remote-Server-Administrator-Tools-RSAT-for-Vista"/>
    <id>http://kennydust.com/site.aspx/Blog/Remote-Server-Administrator-Tools-RSAT-for-Vista</id>
    <updated>2009-06-12T04:08:39.547</updated>
    <published>2008-11-10T18:36:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="Windows" />
    <content type="html" xml:lang="en">
      &lt;p&gt;I am moving to Vista.&amp;nbsp;Reluctantly at first, but I've found this operating system to be quite feature rich and powerful; and so far I see no reason why to uninstall it (6 weeks and counting). It was probably the exposure to the volume of apple commercials that convinced me that Microsoft and Vista were the plague -- and as a developer I should do everything to avoid it. With that said, I've dev'd primarily on my XP instance in the past, and one of the tools that I need on occasion is the handy &lt;a target=&quot;_blank&quot; href=&quot;http://www.techotopia.com/images/8/89/Windows_server_2008_remote_desktops_sessions.jpg&quot;&gt;remote desktops&lt;/a&gt; application available only in the &lt;a target=&quot;_blank&quot; href=&quot;http://www.microsoft.com/downloads/details.aspx?FamilyID=c16ae515-c8f4-47ef-a1e4-a8dcbacff8e3&amp;amp;displaylang=en&quot;&gt;Windows Server 2003 Administrator Tools Pack&lt;/a&gt; add-on (as an separate download).&lt;/p&gt;
&lt;p&gt;I now needed a Vista version; and in my conversations with a colleague, I was told this tool pack was only available for Windows Server 2003 and XP, not Vista.&lt;/p&gt;
&lt;p&gt;Sprung into action, I performed a few google searches and found out Microsoft does indeed address this for Vista customers. But only if you've have Service pack 1 installed. &amp;quot;RSAT&amp;quot; as they call it, is available in both 32 and 64 bit versions.&lt;/p&gt;
&lt;p&gt;The direct link to the Microsoft KB article (and downloads) is &lt;a target=&quot;_blank&quot; href=&quot;http://support.microsoft.com/kb/941314&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The directions to expose this in your Vista instance (after you've downloaded the right copy) is &lt;a target=&quot;_blank&quot; href=&quot;http://presson.wordpress.com/2008/05/13/microsoft-released-admin-pack-for-vista-rsat-windows-server-2008-remote-server-administration-tools/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Initialization failure: WMI provider and SQL Server 2005</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Initialization-failure-WMI-provider-and-SQL-Server-2005"/>
    <id>http://kennydust.com/site.aspx/Blog/Initialization-failure-WMI-provider-and-SQL-Server-2005</id>
    <updated>2009-08-05T22:05:55.953</updated>
    <published>2008-11-09T23:54:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="SQLServer" />
    <content type="html" xml:lang="en">
      &lt;p&gt;Ever open up the SQL Server Configuration Manager and receive this message?&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://kennydust.com/files/media/image/WindowsLiveWriter/InitializationfailureWMIproviderandSQLSe_14FD7/Picture%202_2.png&quot;&gt;&lt;img style=&quot;border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px&quot; height=&quot;80&quot; alt=&quot;Picture 2&quot; width=&quot;514&quot; border=&quot;0&quot; src=&quot;http://kennydust.com/files/media/image/WindowsLiveWriter/InitializationfailureWMIproviderandSQLSe_14FD7/Picture%202_thumb.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have; and an initial google search bring up a bevy of solutions. Unfortunately, the first several offerings did not solve my problem -- which prompted me to dig a little deeper.&lt;/p&gt;
&lt;p&gt;Apparently, I had corrupted my WMI repository somewhere along the line; and after some reading, the WMI can be corrupted after multiple restores of a database... which I'm definitely guilty of. So the solution? rebuild the WMI. Piece of cake, right? Luckily, I stumbled across this &lt;a target=&quot;_blank&quot; href=&quot;http://msmvps.com/blogs/lduncan/articles/20217.aspx&quot;&gt;blog link&lt;/a&gt; which detail these instructions (which can be batched into a .bat file):&lt;/p&gt;

&lt;pre class=&quot;brush: plain;&quot;&gt;
net stop winmgmt 
c: 
cd %systemroot%\system32\wbem 
rd /S /Q repository 

regsvr32 /s %systemroot%\system32\scecli.dll 
regsvr32 /s %systemroot%\system32\userenv.dll 

mofcomp cimwin32.mof 
mofcomp cimwin32.mfl 
mofcomp rsop.mof 
mofcomp rsop.mfl 
for /f %%s in ('dir /b /s *.dll') do regsvr32 /s %%s 
for /f %%s in ('dir /b *.mof') do mofcomp %%s 
for /f %%s in ('dir /b *.mfl') do mofcomp %%s 
echo DONE reboot 
pause
&lt;/pre&gt;

&lt;p&gt;Ottimo! Everything should work. But not so fast, this message appears the next time I try to start up the SQL Server Configuration Manager:&lt;/p&gt;

&lt;pre class=&quot;brush: plain;&quot;&gt;

&quot;Cannot connect to WMI provider. You do not have permission or the server is unreachable. Note that you can only manage SQL Server 2005 servers with SQL Server Configuration Manager. 
Invalid class [0x80041010]&quot;

&lt;/pre&gt;

&lt;p&gt;Motherfunbag. I guess that didn't do it. Opening the command prompt and typing &lt;a target=&quot;_blank&quot; href=&quot;http://blogs.msdn.com/echarran/archive/2006/01/03/509061.aspx&quot;&gt;the below&lt;/a&gt; addresses this and ultimately fixes my issue:&lt;/p&gt;

&lt;pre class=&quot;brush: plain;&quot;&gt;

C:\Program Files\Microsoft SQL Server\90\Shared&gt;mofcomp &quot;C:\Program Files\Microsoft SQL Server\90\Shared\sqlmgmproviderxpsp2up.mof&quot;

Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180 
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved. 
Parsing MOF file: C:\Program Files\Microsoft SQL Server\90\Shared\sqlmgmprovider 
xpsp2up.mof 
MOF file has been successfully parsed 
Storing data in the repository... 
Done!


&lt;/pre&gt;
    </content>
  </entry>
  <entry>
    <title type="html">AssertExtraSocks()</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/AssertExtraSocks"/>
    <id>http://kennydust.com/site.aspx/Blog/AssertExtraSocks</id>
    <updated>2009-06-12T04:08:37.937</updated>
    <published>2008-11-07T13:23:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="PDC" />
    <content type="html" xml:lang="en">
      &lt;p&gt;A word of advice to anyone traveling for more than a day -- pack extra socks.&lt;/p&gt;
&lt;p&gt;I made above the mistake and walked out of my house with just the one pair on my feet. The Microsoft PDC conference was slated for 4 days; and lets just say by the third day -- my feet were pretty smelly. It also didn't help that I stayed in the &lt;a target=&quot;_blank&quot; href=&quot;/events/pdc/my-motel-in-the-ghetto/&quot;&gt;ghetto&lt;/a&gt; with no Target, Foot Locker or anything else in sight; I had to block out an hour on day 3 to find something quickly.&lt;/p&gt;
&lt;p&gt;3 Day old pair:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://kennydust.com/files/media/image/WindowsLiveWriter/Alwayspackextrasockswhentraveling_BA16/IMG_0226.jpg&quot;&gt;&lt;img style=&quot;border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px&quot; height=&quot;244&quot; alt=&quot;IMG_0226&quot; width=&quot;184&quot; border=&quot;0&quot; src=&quot;http://kennydust.com/files/media/image/WindowsLiveWriter/Alwayspackextrasockswhentraveling_BA16/IMG_0226_thumb.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;New Socks:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://kennydust.com/files/media/image/WindowsLiveWriter/Alwayspackextrasockswhentraveling_BA16/IMG_0227.jpg&quot;&gt;&lt;img style=&quot;border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px&quot; height=&quot;244&quot; alt=&quot;IMG_0227&quot; width=&quot;184&quot; border=&quot;0&quot; src=&quot;http://kennydust.com/files/media/image/WindowsLiveWriter/Alwayspackextrasockswhentraveling_BA16/IMG_0227_thumb.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">My Motel in the Ghetto</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/My-Motel-in-the-Ghetto"/>
    <id>http://kennydust.com/site.aspx/Blog/My-Motel-in-the-Ghetto</id>
    <updated>2009-06-12T04:08:37.623</updated>
    <published>2008-11-06T15:19:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="PDC" />
    <content type="html" xml:lang="en">
      &lt;p&gt;We made plans for our Microsoft Convention a little too late, so we ended up staying a 50 dollar a night motel in the Ghetto. Think of &amp;quot;&lt;a target=&quot;_blank&quot; href=&quot;http://nbc.com/earl/&quot;&gt;My Name is Earl&lt;/a&gt;&amp;quot;&amp;nbsp; when you see these photos.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://kennydust.com/files/media/image/WindowsLiveWriter/MyMotelintheGhetto_D410/motel_2.jpg&quot;&gt;&lt;img style=&quot;border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px&quot; height=&quot;525&quot; alt=&quot;motel&quot; width=&quot;395&quot; border=&quot;0&quot; src=&quot;http://kennydust.com/files/media/image/WindowsLiveWriter/MyMotelintheGhetto_D410/motel_thumb.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Even the locals are nice and friendly!&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;http://eldib.files.wordpress.com/2007/11/homeless.jpg&quot; /&gt;&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Fallout 3 Rocks</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Fallout-3-Rocks"/>
    <id>http://kennydust.com/site.aspx/Blog/Fallout-3-Rocks</id>
    <updated>2009-06-12T04:08:34.39</updated>
    <published>2008-11-06T15:03:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="Fallout3" />
    <content type="html" xml:lang="en">
      &lt;p&gt;So I've been playing Fallout 3 on the PS3 recently and it kicks some serious ass. Some of the best things about the game? Intense close-combat fighting scenarios, body dismemberment, fluid graphics and excellent gameplay.&lt;/p&gt;
&lt;p&gt;Fallout 3 is an RPG/first person shooter hybrid which uses the Oblivion engine as its base. Where they differ is the combat systems, however the RPG/gameplay experience is just as rich.&lt;/p&gt;
&lt;p&gt;The game takes place in a post-apocalyptic setting in the late 22nd century, though its story and artwork are heavily influenced by the post-World War II nuclear paranoia of the 1950s. It was originally developed and owned by &lt;a target=&quot;_blank&quot; href=&quot;http://interplay.com&quot;&gt;Interplay&lt;/a&gt;, but development and rights of Fallout was sold to &lt;a target=&quot;_blank&quot; href=&quot;http://bethsoft.com&quot;&gt;bethsoft&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here are some of the screen shots:&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://fallout.bethsoft.com/images/art/fallout3screens/screen42B.jpg&quot;&gt;&lt;img alt=&quot;&quot; width=&quot;500&quot; src=&quot;http://fallout.bethsoft.com/images/art/fallout3screens/screen42B.jpg&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://fallout.bethsoft.com/images/art/fallout3screens/screen07B.jpg&quot;&gt;&lt;img alt=&quot;&quot; width=&quot;500&quot; src=&quot;http://fallout.bethsoft.com/images/art/fallout3screens/screen07B.jpg&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://fallout.bethsoft.com/images/art/fallout3screens/screen30B.jpg&quot;&gt;&lt;img alt=&quot;&quot; width=&quot;500&quot; src=&quot;http://fallout.bethsoft.com/images/art/fallout3screens/screen30B.jpg&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://fallout.bethsoft.com/images/downloads/wallpapers/fallout-wp7-800x600.jpg&quot;&gt;&lt;img alt=&quot;&quot; width=&quot;500&quot; src=&quot;http://fallout.bethsoft.com/images/downloads/wallpapers/fallout-wp7-800x600.jpg&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Dynamic Typing in C# 4.0</title>
    <link rel="alternate" type="text/html" href="http://kennydust.com/site.aspx/Blog/Dynamic-Typing-in-CSharp4"/>
    <id>http://kennydust.com/site.aspx/Blog/Dynamic-Typing-in-CSharp4</id>
    <updated>2009-08-05T22:09:49.533</updated>
    <published>2008-10-28T01:44:00</published>
    <author>
      <name>kennydust</name>
    </author>
    <category term="Code" />
    <content type="html" xml:lang="en">
      &lt;p&gt;I'm here at PDC 08 and attended a great session by Anders Hejlsberg for some of the things coming down the pipe for C# 4.0. One of the more exciting offerings is the idea of resolving names in your code at runtime instead of compile time via dynamic lookup. There is a new static Type called &lt;strong&gt;dynamic&lt;/strong&gt; which it's usage pattern is such:&lt;/p&gt;

&lt;pre class=&quot;brush: c#;&quot;&gt;
dynamic calc = new Calculator ();
int sum = calc.Add(10, 20);
&lt;/pre&gt;


&lt;p&gt;In addition, it can be used in as a argument modifier for methods:&lt;/p&gt;


&lt;pre class=&quot;brush: c#;&quot;&gt;
void RunCalculator(dynamic calc, int num1, int num2)
{
   calc.Add(num1, num2);
}
&lt;/pre&gt;

&lt;p&gt;This is an incredibly powerful feature and Anders himself points out the evolution of C# is in dynamic programming. I guess the initial thought racing through my head is obvious -- what is the performance cost of using &lt;em&gt;&lt;strong&gt;dynamics&lt;/strong&gt;&lt;/em&gt;? I've always been against late-binding anything. More thoughts about this later.&lt;/p&gt;
    </content>
  </entry>
</feed>
