<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Lee Kelleher's Weblog</title>
	<atom:link href="http://blog.leekelleher.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.leekelleher.com</link>
	<description>Just another WordPress.com weblog</description>
	<pubDate>Wed, 03 Sep 2008 09:59:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting up Visual Studio to work with Umbraco</title>
		<link>http://blog.leekelleher.com/2008/08/20/setting-up-visual-studio-to-work-with-umbraco/</link>
		<comments>http://blog.leekelleher.com/2008/08/20/setting-up-visual-studio-to-work-with-umbraco/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 18:17:26 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[CMS]]></category>

		<category><![CDATA[Umbraco]]></category>

		<category><![CDATA[Visual Studio]]></category>

		<category><![CDATA[VS.NET 2008]]></category>

		<guid isPermaLink="false">http://leekelleher.wordpress.com/?p=81</guid>
		<description><![CDATA[Over the last 12 months I have been involved with developing several Umbraco-powered websites. During that time I&#8217;ve experienced many development frustrations; specifically with debugging and version control.
A while back I read Paul Sterling&#8217;s blog post on &#8220;Working with Umbraco in Visual Studio&#8221; - I used this as my basis.  I have added to his [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Over the last 12 months I have been involved with developing several <a href="http://umbraco.org/">Umbraco</a>-powered websites. During that time I&#8217;ve experienced many development frustrations; specifically with debugging and version control.</p>
<p>A while back I read Paul Sterling&#8217;s blog post on &#8220;<a href="http://www.motusconnect.com/blog/2007/12/10/working%20with%20umbraco%20in%20visual%20studio.aspx">Working with Umbraco in Visual Studio</a>&#8221; - I used this as my basis.  I have added to his orignal suggestions:</p>
<ol>
<li>Have a clean, working copy of Umbraco - using the installer - on your machine.  I am using: <code>C:\inetpub\wwwroot\umbraco\</code> for my working copy of the site.</li>
<li>My Visual Studio solution/project will be kept under version-control.  Since I use Subversion, (with <a href="http://tortoisesvn.net/">TortoiseSVN</a> and <a href="http://www.visualsvn.com/visualsvn/">VisualSVN</a>), I prefer to keep all my code under: <code>C:\SVN\</code></li>
<li>In the Visual Studio project, I create the following folders:
<ol>
<li><code>/_templates</code></li>
<li><code>/css</code></li>
<li><code>/scripts</code></li>
<li><code>/usercontrols</code></li>
<li><code>/xslt</code></li>
</ol>
<p>These folders reflect the files that will be used in my Umbraco site.  The &#8220;<code>/_templates</code>&#8221; folder is used to store a text-based version of Umbraco templates, so that I can keep them under version-control; as I&#8217;ve had a situation in the past where someone copied over the wrong template - not very pretty.</li>
<li>In Visual Studio, create a post-build event [from Project &gt; Properties &gt; Build Events] to copy all your working files across to your Umbraco installation.
<pre name="code" class="jscript">
XCOPY &quot;$(ProjectDir)bin\$(ProjectName)*.*&quot; &quot;C:\Inetpub\wwwroot\umbraco\bin\&quot; /y
XCOPY &quot;$(ProjectDir)usercontrols\*.ascx&quot; &quot;C:\Inetpub\wwwroot\umbraco\usercontrols\&quot; /y
XCOPY &quot;$(ProjectDir)xslt\*.xslt&quot; &quot;C:\Inetpub\wwwroot\umbraco\xslt\&quot; /y
XCOPY &quot;$(ProjectDir)scripts\*.js&quot; &quot;C:\Inetpub\wwwroot\umbraco\scripts\&quot; /y
</pre>
<p>You may notice that I am not copying across the <code>*.css</code> stylesheet files across to Umbraco.  The reason for this is that the current version of Umbraco (v3.0.3) stores the contents of the CSS files in the database, and not on the file-system.</p>
<p>You can either set the &#8220;Run the post-build event&#8221; whichever option you prefer.</li>
<li>Once your files have been copied across to Umbraco, you can debug your code in Visual Studio:
<ol>
<li> Open the site (usually http://localhost/) in your web-browser.</li>
<li> In Visual Studio select the Debug &gt; Attach to Process menu.</li>
<li> Select the ASP.NET worker process from the list - this is usually called &#8220;<code>aspnet_wp.exe</code>&#8221; or &#8220;<code>w3wp.exe</code>&#8221; - then press OK.</li>
</ol>
</li>
</ol>
<p>It&#8217;s important to note that I am developing on Visual Studio 2008; but the same prinicple should apply to VS.NET 2005. (<strong><span style="text-decoration:underline;">Update</span></strong>: It isn&#8217;t so straight-forward in VS.NET 2005, <a href="http://blog.leekelleher.com/2008/08/20/setting-up-visual-studio-to-work-with-umbraco/#comment-110">see Brad&#8217;s comment for further details</a>.)</p>
<p>I&#8217;m still looking at ways to improve my development set-up with Umbraco/Visual Studio, so if anyone has any tips - please pass them my way!  I&#8217;m especially interested in ways of dynamically updating the stylesheets/templates via the Umbraco API.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/leekelleher.wordpress.com/81/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/leekelleher.wordpress.com/81/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/81/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=81&subd=leekelleher&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2008/08/20/setting-up-visual-studio-to-work-with-umbraco/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/vertino-128.jpg" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>
	</item>
		<item>
		<title>My WordPress hacked by c99madshell script</title>
		<link>http://blog.leekelleher.com/2008/07/22/my-wordpress-hacked-by-c99madshell-script/</link>
		<comments>http://blog.leekelleher.com/2008/07/22/my-wordpress-hacked-by-c99madshell-script/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 00:35:51 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<category><![CDATA[c99madshell]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[Hacked]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[spam]]></category>

		<category><![CDATA[Travelblog]]></category>

		<category><![CDATA[Upgrade]]></category>

		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://leekelleher.wordpress.com/?p=71</guid>
		<description><![CDATA[After all the excitement of last Friday&#8217;s attempted hack on my travelblog, and the subsequent upgrade to WordPress 2.6 - I thought everything was under control.  Boy was I wrong!
A few hours ago I received a blog comment (from a Mr Andrew Wong) on the travelblog:
http://www.lee-and-lucy.com/travelblog/index.php?p=5817
check this out!!
I clicked the link, my jaw dropped!  It [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>After all the excitement of last Friday&#8217;s attempted hack on my <a href="http://www.lee-and-lucy.com/">travelblog</a>, and the subsequent upgrade to <a href="http://wordpress.org/development/2008/07/wordpress-26-tyner/">WordPress 2.6</a> - I thought everything was under control.  <em><strong>Boy was I wrong!</strong></em></p>
<p>A few hours ago I received a blog comment (from a Mr Andrew Wong) on the <a href="http://www.lee-and-lucy.com/travelblog/2008/07/19/attempted-hack/">travelblog</a>:</p>
<blockquote><p>http://www.lee-and-lucy.com/travelblog/index.php?p=5817<br />
check this out!!</p></blockquote>
<p>I clicked the link, my jaw dropped!  It wasn&#8217;t an attempted hack, it was a very successful hack&#8230; I felt violated -in a digital sense.  The threat was far from over!</p>
<p>From looking through the WordPress management screens, I couldn&#8217;t find a blog post with the ID #5817.  I opened up phpMyAdmin to see if it was in the database; nope, nada, nothing!</p>
<p>I wanted to see the extend of the problem, so I googled &#8220;<a href="http://www.google.co.uk/search?q=site:lee-and-lucy.com">site:lee-and-lucy.com</a>&#8220;, and found a &#8220;lot&#8221; of pages&#8230; oh yes, LOTS OF SPAM!</p>
<p><a href="http://www.google.co.uk/search?q=site:lee-and-lucy.com"><img class="aligncenter size-full wp-image-76" src="http://leekelleher.files.wordpress.com/2008/07/clipboard01.png?w=551&#038;h=300" alt="" width="551" height="300" /></a></p>
<p>To say the least, <a href="http://twitter.com/leekelleher/statuses/864498898">I was furious</a>!  I wanted to; <em>a.</em> resolve this asap; <em>b.</em> find out how this happened; <em>c.</em> cause pain to this would-be hacker!  Obviously, option <em>c.</em> goes against my good karma nature, but they digitally violated my site; sticking spam in places that spam should never go!!! <em><strong>Furious I tell you!</strong></em></p>
<p>Digging through my WordPress files, I find a PHP script in my theme folder called &#8220;<code>simple.php</code>&#8220;; it contains a nested &#8220;<code>eval(gzinflate(base64_encode()))</code>&#8221; string.  Very suspect. I try to manually decrypt the string, (replacing the eval with an echo), but it&#8217;s nested a few levels deep&#8230; so <a href="http://uk3.php.net/manual/en/function.eval.php#59862">I found a snippet of code that would easily decode/decrypt it</a>.</p>
<p>The script turned out to be a modified version of <a href="http://www.derekfountain.org/security_c99madshell.php">c99madshell</a>, specifically focused on <a href="http://wordpress.org/tags/c99madshell">WordPress hi-jacks</a>.  The script tries to inject a small trojan code into one of the core WP files (for me it was the &#8220;<code>wp-blog-header.php</code>&#8220;).  I removed the hi-jacked code, along with the &#8220;<code>simple.php</code>&#8221; file (from my theme folder) - then re-upgraded to the latest WordPress (2.6) &#8230; just to overwrite any other tampered files.</p>
<p>Hopefully this should be the end of this matter (until next time) &#8230;.  I&#8217;ll be keeping a careful eye on my WordPress installations now on.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/leekelleher.wordpress.com/71/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/leekelleher.wordpress.com/71/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=71&subd=leekelleher&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2008/07/22/my-wordpress-hacked-by-c99madshell-script/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/vertino-128.jpg" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>

		<media:content url="http://leekelleher.files.wordpress.com/2008/07/clipboard01.png" medium="image" />
	</item>
		<item>
		<title>Hindsight&#8230; It&#8217;s is a wonderful thing!</title>
		<link>http://blog.leekelleher.com/2008/07/18/hindsight-its-is-a-wonderful-thing/</link>
		<comments>http://blog.leekelleher.com/2008/07/18/hindsight-its-is-a-wonderful-thing/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 23:02:58 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<category><![CDATA[Hacked]]></category>

		<category><![CDATA[Travelblog]]></category>

		<category><![CDATA[Upgrade]]></category>

		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://leekelleher.wordpress.com/?p=57</guid>
		<description><![CDATA[A couple of hours ago I received an automated email from our Travelblog site, saying that we had a new user registration; which was strange, since we disabled that feature a long time ago!  Great! We&#8217;ve just been hacked!
I put my hands up in the air, I&#8217;d been running an old version of WordPress (2.2) [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A couple of hours ago I received an automated email from our <a href="http://www.lee-and-lucy.com/">Travelblog</a> site, saying that we had a new user registration; which was strange, since we disabled that feature a long time ago!  Great! <strong>We&#8217;ve just been hacked!</strong></p>
<p>I put my hands up in the air, I&#8217;d been running an old version of WordPress (<a href="http://wordpress.org/development/2007/05/wordpress-22/">2.2</a>) &#8230; which I&#8217;ve been meaning to upgrade for a long time; but hey, <a href="http://www.lee-and-lucy.com/travelblog/2007/10/24/we-got-the-keys/">I&#8217;ve bought a house</a>, <a href="http://www.lee-and-lucy.com/travelblog/2008/02/18/katelyn-mary-kelleher/">had a baby</a> and <a href="http://bodenko.com/">build my business</a> during that time! It&#8217;s not been at the top of my priories.  So yes, I&#8217;m aware of the security holes/risks, etc.</p>
<p>Needless to say, <a href="http://kev.coolcavemen.com/2007/06/wordpress-22-security-hole-identity-theft/">WordPress 2.2 has an ugly security hole</a> which allows hackers to remotely inject SQL statements into the database.  <em>I&#8217;d heard about this at the time, but thought I was covered because it relied on the hacker having a valid username/password (<a href="http://trac.wordpress.org/ticket/4357#comment:5">see the trac ticket</a>).</em> <strong>Well it seems they don&#8217;t!</strong></p>
<p>Within a minute of receiving the new user registration email, I deleted the user account, changed our passwords and upgraded to <a href="http://wordpress.org/development/2008/07/wordpress-26-tyner/">WordPress 2.6</a> - which came with it&#8217;s own set of problems (i.e. <a href="http://blog.cumps.be/wordpress-26-upgrade-fix-missing-categories/">all the category names disappeared</a>).</p>
<p>Here are the details of the would-be hacker, so others know about him:</p>
<blockquote><p>Username: sidon<br />
E-mail: Dimka@hotmail.com</p></blockquote>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/leekelleher.wordpress.com/57/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/leekelleher.wordpress.com/57/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=57&subd=leekelleher&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2008/07/18/hindsight-its-is-a-wonderful-thing/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/vertino-128.jpg" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>
	</item>
		<item>
		<title>How to prevent hotlinking to FLV files? (Flash Videos)</title>
		<link>http://blog.leekelleher.com/2008/07/02/how-to-prevent-hotlinking-to-flv-files-flash-videos/</link>
		<comments>http://blog.leekelleher.com/2008/07/02/how-to-prevent-hotlinking-to-flv-files-flash-videos/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 13:07:22 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<category><![CDATA[flash]]></category>

		<category><![CDATA[flv]]></category>

		<category><![CDATA[hotlinking]]></category>

		<category><![CDATA[htaccess]]></category>

		<category><![CDATA[HTTP_REFERER]]></category>

		<guid isPermaLink="false">http://leekelleher.wordpress.com/?p=49</guid>
		<description><![CDATA[My friend Shane (from DVD House of Horrors) is having a hard time trying to stop other websites hotlinking to his horror movie clips.  The site is running Joomla on a Linux server, so he&#8217;s been down the usual .htaccess routes to prevent remote hotlinking.
However the problem with FLV files is that they aren&#8217;t requested [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>My friend Shane (from <a href="http://dvdhouseofhorror.net/">DVD House of Horrors</a>) is having a hard time trying to stop other websites hotlinking to his horror movie clips.  The site is running Joomla on a Linux server, so he&#8217;s been down the usual .htaccess routes to <a href="http://forum.powweb.com/showthread.php?t=79757">prevent remote hotlinking</a>.</p>
<p>However the problem with FLV files is that they aren&#8217;t requested directly by the web-browser, but rather the Flash video player (a .swf file).  This causes a problem for the .htacces rules as there is no <a href="http://en.wikipedia.org/wiki/HTTP_referer">HTTP_REFERER</a> value to restrict against.</p>
<p>This is causing an unnecessary hit on Shane&#8217;s bandwidth costs&#8230; so he&#8217;s desperately looking for an answer.</p>
<p>Any ideas are most welcome. Thanks.</p>
<p><span style="text-decoration:underline;"><strong>Update:</strong></span> It seems that a lot of people have this same problem&#8230; so I suggested to Shane to turn the situation around by using the hotlinking as an advert for his site.  <a href="http://dvdhouseofhorror.net/blog/?p=78">All his video clips are watermarked with the DVD House of Horrors logo.</a></p>
<p>I&#8217;m curious why the developers of the Flash video players don&#8217;t send a HTTP_REFERER value, but then again that&#8217;s also easy to spoof.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/leekelleher.wordpress.com/49/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/leekelleher.wordpress.com/49/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=49&subd=leekelleher&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2008/07/02/how-to-prevent-hotlinking-to-flv-files-flash-videos/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/vertino-128.jpg" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>
	</item>
		<item>
		<title>.NET Test-Driven Development</title>
		<link>http://blog.leekelleher.com/2008/07/02/test-driven-development-dotnet/</link>
		<comments>http://blog.leekelleher.com/2008/07/02/test-driven-development-dotnet/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 01:43:55 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<category><![CDATA[.NET]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[help]]></category>

		<category><![CDATA[Test]]></category>

		<guid isPermaLink="false">http://leekelleher.wordpress.com/?p=47</guid>
		<description><![CDATA[Has anyone got any pointers on how I should start doing test-driven development in .NET?
It&#8217;s something I&#8217;ve been meaning to look into for years now.  I&#8217;ve got all the usual Visual Studio add-ons installed&#8230; NUnit, TestDriven.NET, etc.  But no idea how to use them!
Usually I learn this stuff on the job, yet from most other [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Has anyone got any pointers on how I should start doing test-driven development in .NET?</p>
<p>It&#8217;s something I&#8217;ve been meaning to look into for years now.  I&#8217;ve got all the usual Visual Studio add-ons installed&#8230; NUnit, TestDriven.NET, etc.  But no idea how to use them!</p>
<p>Usually I learn this stuff on the job, yet from most other developers I speak to - it&#8217;s all guess-work!</p>
<p>Any advice is much appreciated!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/leekelleher.wordpress.com/47/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/leekelleher.wordpress.com/47/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=47&subd=leekelleher&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2008/07/02/test-driven-development-dotnet/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/vertino-128.jpg" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>
	</item>
		<item>
		<title>Last.fm Web Services</title>
		<link>http://blog.leekelleher.com/2008/07/02/lastfm-web-services/</link>
		<comments>http://blog.leekelleher.com/2008/07/02/lastfm-web-services/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 01:29:27 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<category><![CDATA[.NET]]></category>

		<category><![CDATA[api]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[flickr]]></category>

		<category><![CDATA[last.fm]]></category>

		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://leekelleher.wordpress.com/?p=42</guid>
		<description><![CDATA[ Last weekend, the good folk at Last.fm revealed version 2.0 of their public API:
The new API introduces a user authentication protocol which for the first time allows applications to create user sessions, bringing both read and write services to web apps, desktop apps and mobile devices.
Take our new tagging API’s. Developers can both pull [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://www.last.fm/"><img class="alignright" src="http://cdn.last.fm/depth/advertising/lastfm/badge_red_rev.gif" alt="Last.fm" width="150" height="60" /></a> Last weekend, <a href="http://blog.last.fm/2008/06/27/developers-developers-developers">the good folk at Last.fm revealed version 2.0 of their public API</a>:</p>
<blockquote><p>The new API introduces a user authentication protocol which for the first time allows applications to create user sessions, bringing both read and write services to web apps, desktop apps and mobile devices.</p>
<p>Take our new tagging API’s. Developers can both pull and apply tags to music content from any application on any platform now. The same goes for sharing – developers can build Last.fm sharing support into any app.</p>
<p>There are also new search, playlist, event and geo API’s being rolled out today, with lots more stuff planned in the coming weeks and months.</p></blockquote>
<p>At first glance, I noticed that there were a couple of key features (to me) were missing - <a href="http://www.last.fm/group/Last.fm+Web+Services/forum/21604/_/426605">namely the &#8220;Get Similar Tracks&#8221;</a> - the Last.fm staff reminded me that <em>they are planning to roll out more features in the coming weeks and months!</em> OK, okay&#8230; I&#8217;ll be more patient!</p>
<p>The new API feels and works like the Flickr API; with very similar convensions of the method/call names and authentication/token process.  This isn&#8217;t a bad thing - just that I feel they should be leading the crowd, rather than following it.  (The <a href="http://beta.last.fm/home">beta version</a> of the upcoming Last.fm site <a href="http://www.last.fm/group/Last.fm+Beta/forum/95114/_/427221">is being critisised for being a &#8220;facebook clone&#8221;</a>!)</p>
<p>Regardless of my negative comments, I&#8217;m actually a fan of the <a href="http://www.last.fm/api">new API</a> - being more structured and scalable.  I&#8217;m considering writing a .NET wrapper library (C#) for it too!  As I&#8217;ve got plans for a small iTunes/Last.fm playlist app, that would require it; (all open-source, of course).</p>
<p>Since the new API follows similar Flickr API convensions, it seems to make sense that I could/should base my Last.fm .NET wrapper on it&#8217;s Flickr counter-part&#8230;. <a href="http://www.wackylabs.net/flickr/flickr-api/">Flickr.NET API</a>.  The library is developed in a decent way - deserializing XML objects into the appropriate classes.  It feels a lot nicer to develop with, rather than messing around with XPath node selections!</p>
<p>Not sure when I&#8217;ll get the time to develop the library, as my contract work is as busy as ever!! Hopefully things will calm down in a couple of weeks!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/leekelleher.wordpress.com/42/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/leekelleher.wordpress.com/42/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=42&subd=leekelleher&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2008/07/02/lastfm-web-services/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/vertino-128.jpg" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>

		<media:content url="http://cdn.last.fm/depth/advertising/lastfm/badge_red_rev.gif" medium="image">
			<media:title type="html">Last.fm</media:title>
		</media:content>
	</item>
		<item>
		<title>Firefox 3 - Download Day</title>
		<link>http://blog.leekelleher.com/2008/06/17/firefox-3-download-day/</link>
		<comments>http://blog.leekelleher.com/2008/06/17/firefox-3-download-day/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 00:01:03 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<category><![CDATA[download]]></category>

		<category><![CDATA[firefox]]></category>

		<category><![CDATA[Guinness World Record]]></category>

		<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://leekelleher.wordpress.com/?p=40</guid>
		<description><![CDATA[
Today is Firefox 3 Download Day!  Mozilla are hoping to set a Guinness World Record for most software downloads in 24 hours.
At the time of writing, over 1.2 million people have pledged to download Firefox 3 on the Download Day!
This is a first attempt of this record, so there is no number to beat. [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:center;"><a href="http://www.spreadfirefox.com/node&amp;id=192858&amp;t=264"><img class="aligncenter" src="http://www.spreadfirefox.com/files/images/affiliates_banners/dday_badge_fox.png" border="0" alt="Download Day" /></a></p>
<p>Today is Firefox 3 Download Day!  <a href="http://www.spreadfirefox.com/en-US/worldrecord/">Mozilla are hoping to set a Guinness World Record for most software downloads in 24 hours.</a></p>
<p>At the time of writing, over 1.2 million people have pledged to download Firefox 3 on the Download Day!</p>
<p>This is a first attempt of this record, so there is no number to beat.  But Mozilla want to outdo the number of Firefox 2 downloads on its launch day, which was 1.6 million!  The aim is 5 million+!</p>
<p style="text-align:center;"><a href="http://www.spreadfirefox.com/node&amp;id=192858&amp;t=264"><img class="aligncenter" src="http://www.spreadfirefox.com/sites/all/themes/spreadfirefox_RCS/images/download-day/buttons/en-US/468x60_dday.png" border="0" alt="Download Day 2008" /></a></p>
<p><span style="text-decoration:underline;"><strong>Update:</strong></span> It&#8217;s official, Firefox 3 set a Guinness World Record for the most software downloads in 24 hours. Reaching <strong>8,002,530</strong> downloads! <a title="Firefox 3 - Download Day 2008" href="http://leekelleher.files.wordpress.com/2008/07/download-day-2008.pdf">They even give me a certificate for taking part</a> &#8230; feels like I&#8217;m back at primary school! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> (<a href="http://www.youtube.com/watch?v=gQr-kHK6Kvc"><em>so proud!</em></a>)</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/leekelleher.wordpress.com/40/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/leekelleher.wordpress.com/40/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=40&subd=leekelleher&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2008/06/17/firefox-3-download-day/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/vertino-128.jpg" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>

		<media:content url="http://www.spreadfirefox.com/files/images/affiliates_banners/dday_badge_fox.png" medium="image">
			<media:title type="html">Download Day</media:title>
		</media:content>

		<media:content url="http://www.spreadfirefox.com/sites/all/themes/spreadfirefox_RCS/images/download-day/buttons/en-US/468x60_dday.png" medium="image">
			<media:title type="html">Download Day 2008</media:title>
		</media:content>
	</item>
		<item>
		<title>How to best embed a WMV video clip?</title>
		<link>http://blog.leekelleher.com/2008/06/09/how-to-best-embed-a-wmv-video-clip/</link>
		<comments>http://blog.leekelleher.com/2008/06/09/how-to-best-embed-a-wmv-video-clip/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 14:56:11 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<category><![CDATA[browser]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[embed]]></category>

		<category><![CDATA[HTML]]></category>

		<category><![CDATA[platform]]></category>

		<category><![CDATA[video]]></category>

		<category><![CDATA[wmv]]></category>

		<guid isPermaLink="false">http://leekelleher.wordpress.com/?p=38</guid>
		<description><![CDATA[I hate to admit it, but I&#8217;m stuck&#8230; I&#8217;m trying to figure out how to best embed a WMV video clip in a web-page, so that it works cross-browser (and cross-platform).
Even after all my years of web-development, I&#8217;m still confused to which browser supports which tag &#8230; nested &#60;embed&#62; tags in &#60;object&#62; tags &#8230; it [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I hate to admit it, but I&#8217;m stuck&#8230; I&#8217;m trying to figure out how to best embed a WMV video clip in a web-page, so that it works cross-browser (and cross-platform).</p>
<p>Even after all my years of web-development, I&#8217;m still confused to which browser supports which tag &#8230; nested <code>&lt;embed&gt;</code> tags in <code>&lt;object&gt;</code> tags &#8230; <em>it gets messy!</em></p>
<p>I&#8217;m as equally confused with the Class ID attribute: &#8220;<code>CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6</code>&#8221; - surely that can&#8217;t be the same across all browsers/platforms?!</p>
<p>A List Apart article discusses dropping the <code>&lt;embed&gt;</code> tag.  Which sounds like a good idea to me.  The HTML looks <em>so</em> much better&#8230; MIME types all the way baby!!</p>
<pre name="code" class="html">

&lt;object type=&quot;video/x-ms-wmv&quot; data=&quot;/media/video.wmv&quot; width=&quot;320&quot; height=&quot;260&quot;&gt;
	&lt;param name=&quot;src&quot; value=&quot;/media/video.wmv&quot; /&gt;
	&lt;param name=&quot;autostart&quot; value=&quot;0&quot; /&gt;
	&lt;param name=&quot;controller&quot; value=&quot;1&quot; /&gt;
&lt;/object&gt;
</pre>
<p>I tested this on Firefox 2.0 and IE7 on Vista, and IE6 and Safari on XP - all fine, so far so good!  When I ask my client to test the page on their Mac &#8230; <strong>it&#8217;s no good!</strong> The videos just wouldn&#8217;t load! <em>Hmphf!</em></p>
<p>So does anyone know of a simple way of embedding a WMV video clip that works cross-browser/platform? Please let me know, I&#8217;d be very a happy developer!</p>
<p>Otherwise, I&#8217;m so close to using the beastly code that comes from the &#8220;<a href="http://cit.ucsf.edu/embedmedia/step1.php">Embedded Media HTML Generator</a>&#8221; &#8230; <em>help me please!</em> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/leekelleher.wordpress.com/38/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/leekelleher.wordpress.com/38/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=38&subd=leekelleher&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2008/06/09/how-to-best-embed-a-wmv-video-clip/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/vertino-128.jpg" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>
	</item>
		<item>
		<title>How to convert NameValueCollection to a (Query) String</title>
		<link>http://blog.leekelleher.com/2008/06/06/how-to-convert-namevaluecollection-to-a-query-string/</link>
		<comments>http://blog.leekelleher.com/2008/06/06/how-to-convert-namevaluecollection-to-a-query-string/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 13:22:17 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[QueryString]]></category>

		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://leekelleher.wordpress.com/?p=36</guid>
		<description><![CDATA[Most ASP.NET developers know that you can get a key/value pair string from the Request.QueryString object (via the .ToString() method).  However that functionality isn&#8217;t the same for a generic NameValueCollection object (of which Request.QueryString is derived from).
So how do you take a NameValueCollection object and get a nicely formatted key/value pair string? (i.e. &#8220;key1=value1&#38;key2=value2&#8220;) [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Most ASP.NET developers know that you can get a key/value pair string from the <code>Request.QueryString</code> object (via the <code>.ToString()</code> method).  However that functionality isn&#8217;t the same for a generic <code>NameValueCollection</code> object (of which <code>Request.QueryString</code> is derived from).</p>
<p>So how do you take a <code>NameValueCollection</code> object and get a nicely formatted key/value pair string? (i.e. &#8220;<code>key1=value1&amp;key2=value2</code>&#8220;) &#8230; Here&#8217;s a method I wrote a while ago:</p>
<pre name="code" class="csharp">
/// &lt;summary&gt;
/// Constructs a QueryString (string).
/// Consider this method to be the opposite of &quot;System.Web.HttpUtility.ParseQueryString&quot;
/// &lt;/summary&gt;
/// &lt;param name=&quot;nvc&quot;&gt;NameValueCollection&lt;/param&gt;
/// &lt;returns&gt;String&lt;/returns&gt;
public static String ConstructQueryString(NameValueCollection parameters)
{
	List&lt;String&gt; items = new List&lt;String&gt;();

	foreach (String name in parameters)
		items.Add(String.Concat(name, &quot;=&quot;, System.Web.HttpUtility.UrlEncode(parameters[name])));

	return String.Join(&quot;&amp;&quot;, items.ToArray());
}
</pre>
<p>Just in case you didn&#8217;t know about the <code>System.Web.HttpUtility.ParseQueryString</code> method, it&#8217;s a quick way of converting a query (key/value pairs) string back into a <code>NameValueCollection</code>.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/leekelleher.wordpress.com/36/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/leekelleher.wordpress.com/36/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=36&subd=leekelleher&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2008/06/06/how-to-convert-namevaluecollection-to-a-query-string/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/vertino-128.jpg" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>
	</item>
		<item>
		<title>Making Request.QueryString writable (by clone/copy)</title>
		<link>http://blog.leekelleher.com/2008/06/06/making-requestquerystring-writable-by-clonecopy/</link>
		<comments>http://blog.leekelleher.com/2008/06/06/making-requestquerystring-writable-by-clonecopy/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 13:09:31 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
		
		<category><![CDATA[blog]]></category>

		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[QueryString]]></category>

		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://leekelleher.wordpress.com/?p=35</guid>
		<description><![CDATA[Every now and then I completely forget that the Request.QueryString (and Request.Form) object is read-only.  Today I had a bit of functionality where I needed to remove a key/value from the collection - but the Remove() method (of the NameValueCollection object) throws an exception.
Unfortunately, the Request.QueryString&#8217;s CopyTo method assigns the values to an ARRAY, [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Every now and then I completely forget that the <code>Request.QueryString</code> (and <code>Request.Form</code>) object is read-only.  Today I had a bit of functionality where I needed to remove a key/value from the collection - but the <code>Remove()</code> method (of the <code>NameValueCollection</code> object) throws an exception.</p>
<p>Unfortunately, the <code>Request.QueryString</code>&#8217;s <code>CopyTo</code> method assigns the values to an <code>ARRAY</code>, not a <code>NameValueCollection</code> - losing functionality and flexibility.</p>
<p>You need to copy the <code>Request.QueryString</code> object to a new <code>NameValueCollection</code> instance, here&#8217;s how:</p>
<pre name="code" class="csharp">
NameValueCollection qs = new NameValueCollection(Request.QueryString);
</pre>
<p>Now you can add/remove the key/values to your hearts content!</p>
<p>Oh, yeah, remember to import the <code>System.Collections.Specialized</code> namespace too!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/leekelleher.wordpress.com/35/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/leekelleher.wordpress.com/35/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=35&subd=leekelleher&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2008/06/06/making-requestquerystring-writable-by-clonecopy/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/vertino-128.jpg" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>
	</item>
	</channel>
</rss>