<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>58bits - tech</title>
    <link>http://www.58bits.com/blog/</link>
    <description>Six bits short of sixty four...</description>
    <language>en-us</language>
    <copyright>Anthony Bouch</copyright>
    <lastBuildDate>Mon, 23 Nov 2009 18:11:56 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>tony@58bits.com</managingEditor>
    <webMaster>tony@58bits.com</webMaster>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=af7171d7-5fc6-4aad-ae9d-429d52eaeed6</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,af7171d7-5fc6-4aad-ae9d-429d52eaeed6.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,af7171d7-5fc6-4aad-ae9d-429d52eaeed6.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=af7171d7-5fc6-4aad-ae9d-429d52eaeed6</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <title>Google Custom Search Engine and Google Site Search – In 30 Seconds</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,af7171d7-5fc6-4aad-ae9d-429d52eaeed6.aspx</guid>
      <link>http://www.58bits.com/blog/2009/11/23/Google-Custom-Search-Engine-And-Google-Site-Search-In-30-Seconds.aspx</link>
      <pubDate>Mon, 23 Nov 2009 18:11:56 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;A project I’ve been working on recently required a search feature. After a quick look around I thought I’d give a hosted solution a try – using Google Site Search.&lt;/p&gt;  &lt;p&gt;After almost a full day of banging my head against the wall – here’s what I discovered…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;I)&lt;/strong&gt; The only difference between Site Search and Google Custom Search – is that you pay for Site Search and you get on-demand indexing – so you’re guaranteed (in theory) to have all of the pages in your site indexed.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;II)&lt;/strong&gt; Once you’ve paid for Site Search – the control panel is effectively the Custom Search Engine Search control panel – with the on-demand option present.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;III)&lt;/strong&gt; There are three ‘levels’ of control you have over the results on your site.&lt;/p&gt;  &lt;p&gt;Here’s a quick tour of each – assuming you’ve read just enough of the docs (Here’s a link to the &lt;a href="http://code.google.com/intl/en/apis/ajaxsearch/documentation/" target="_blank"&gt;Google AJAX Search API&lt;/a&gt;) to know that you need to link to the jsapi JavaScript library – load the search api via: google.load('search', '1'); and then declare your OnLoad function .&lt;/p&gt;  &lt;p&gt;Note – for all three options it’s a good idea to have the following style sheet at the top of all your test pages – since you get some ‘freebie’ and fast styling as a result.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.google.com/cse/style/look/default.css" href="http://www.google.com/cse/style/look/default.css"&gt;http://www.google.com/cse/style/look/default.css&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;1)&lt;/strong&gt; &lt;strong&gt;google.search.CustomSearchControl&lt;/strong&gt; – with just two lines of code – you can have a custom search page up and running (well not quite two lines – but these are the most important two).&lt;/p&gt;  &lt;pre class="brush: js; auto-links: false;"&gt;var customSearchControl = new google.search.CustomSearchControl('013652945859801643433:fdsfsqjnea4');
customSearchControl.draw('targetDiv');&lt;/pre&gt;

&lt;p&gt;The parameter to the CustomSearchControl is the CSE id for the custom search engine you’ve created – and calling ‘draw’ will render the completed form and search results area to the page. The CustomSearch control has a built in ‘searcher’ based on the settings from your CSE control panel. CustomSearchControl is however a little difficult to customize. I found it hard to turn off the default ‘search’ form and place the results where I wanted them. You can add additional searchers – like images and video search via:&lt;/p&gt;

&lt;pre class="brush: js; auto-links: false;"&gt;customSearchControl.addSearcher(new google.search.ImageSearch(), options);&lt;/pre&gt;

&lt;p&gt;The main point to note here – is that CustomSearchControl is ‘driven’ by the CSE control panel – including filter options, look and feel etc. all based on the search engine unique ID that you’ll also find in the CSE control panel.&lt;/p&gt;

&lt;p&gt;This is custom search with training-wheels on.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2)&lt;/strong&gt; &lt;strong&gt;google.search.SearchControl&lt;/strong&gt; – is the next level down in abstraction – and here’s the ‘&lt;a href="http://code.google.com/intl/en/apis/ajaxsearch/documentation/#The_Hello_World_of_Google_Search" target="_blank"&gt;Hello World&lt;/a&gt;’ example from the docs. With SearchControl – you have to add searchers to the control and then you can tell the control to ‘draw’ itself – just like with the CustomSearchControl. However it’s a little easier to customize. For example:&lt;/p&gt;

&lt;pre class="brush: js; auto-links: false; highlight: [8];"&gt;this.control = new google.search.SearchControl();
// set up for CSE result sets
this.control.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);

// configure search control
var options = new google.search.SearcherOptions();
options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
options.setRoot(resultsDiv)

var searcher = new google.search.WebSearch();
searcher.setSiteRestriction(&amp;quot;01365294584480dsadad3:ffsfsfseqjnea4&amp;quot;);
searcher.setUserDefinedLabel(&amp;quot;Search Results&amp;quot;);
searcher.setLinkTarget(google.search.Search.LINK_TARGET_SELF);

this.control.addSearcher(searcher, options);

this.control.draw();&lt;/pre&gt;

&lt;p&gt;Note the options.setRoot(resultsDiv) highlighted line. This does two things – 1) It sends the output of the search to the ‘resultsDiv’ and 2) it turns off the submit form – which means you can now control the input to search – from your own form – placed anywhere on the page as long as you handle the OnSubmit event and call &lt;/p&gt;

&lt;p&gt;this.control.execute(‘formInputValue’);&lt;/p&gt;

&lt;p&gt;Again if you link to &lt;a title="http://www.google.com/cse/style/look/default.css" href="http://www.google.com/cse/style/look/default.css"&gt;http://www.google.com/cse/style/look/default.css&lt;/a&gt; – you’ll get some instant results that look ok.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3)&lt;/strong&gt; &lt;strong&gt;google.search.Search&lt;/strong&gt; – is the lowest level abstraction – the raw searcher class – and although you still get some good stuff here, you will have to take care of rendering the results to the page. In this case you will need to handle the input and output for every class of searcher you use – Web, Local, Image or Video – all of which are derived from google.search.Search. For example…&lt;/p&gt;

&lt;pre class="brush: js; auto-links: false;"&gt;// Our searcher instance.
var searcher = new google.search.WebSearch();

searcher.setSiteRestriction(&amp;quot;013652945859801616623:ecbgsqjnea4&amp;quot;);
searcher.setResultSetSize(google.search.Search.LARGE_RESULTSET);
searcher.setUserDefinedLabel(&amp;quot;QCC Search Results&amp;quot;);
searcher.setLinkTarget(google.search.Search.LINK_TARGET_SELF);
searcher.setSearchCompleteCallback(this, searchComplete, null);

var searchForm = document.getElementById(&amp;quot;search&amp;quot;);
if (searchForm.q.value) {
    searcher.execute(searchForm.q.value);
}&lt;/pre&gt;

&lt;p&gt;Here's a link to a complete example of a &lt;a href="http://code.google.com/apis/ajax/playground/#raw_search" target="_blank"&gt;raw search with output being handled by the developer&lt;/a&gt; (which is in another area of the Google docs – the Code Playground).&lt;/p&gt;

&lt;p&gt;While there’s more plumbing required here – you’re still off to a good start. &lt;strong&gt;&lt;em&gt;Unlike&lt;/em&gt; &lt;/strong&gt;the sample above for raw handling of the results – you can use the .html property of the result object in the results array – which will tie up again nicely with the linked style sheet - and you’ll have a ‘Goggle-like’ – good-to-go search experience in your site. Like this…&lt;/p&gt;

&lt;pre class="brush: js; auto-links: false;"&gt;function searchComplete() {
    // Check that we got results            
    if (searcher.results &amp;amp;&amp;amp; searcher.results.length &amp;gt; 0) {
        // Grab our content div, clear it.
        var resultsDiv = document.getElementById('results');
        resultsDiv.innerHTML = '';
        // Loop through our results, printing them to the page.
        var results = searcher.results;
        for (var i = 0; i &amp;lt; results.length; i++) {
            // For each result write it's title and image to the screen
            var result = results[i];
            resultsDiv.appendChild(result.html);
        }

        // Now add the paging links so the user can see more results.
        addPaginationLinks(searcher);
    }
}&lt;/pre&gt;

&lt;p&gt;And that's it. There &lt;strong&gt;&lt;em&gt;is&lt;/em&gt;&lt;/strong&gt; documentation available for all of this – but it’s in various locations. The first examples you will see if you come to search via the CSE control panel – will be the CustomSearchControl. The hard part was the ‘orientation’ exercise that I had to go through to understand what the heck I was using, where it fit in the bigger picture of the search API, and how I could create a more customized search experience. The docs are a bit all over the shop in this case – and so it took me nearly a day to write some POC tests and properly understand the relationship between google.search.CustomSearchControl, google.search.SearchControl and good.search.Search.&lt;/p&gt;

&lt;p&gt;Hope this post helps to reduce the pain for anyone else that’s new to Google Search and would like to implement a tailored search experience.&lt;/p&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=af7171d7-5fc6-4aad-ae9d-429d52eaeed6"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,af7171d7-5fc6-4aad-ae9d-429d52eaeed6.aspx</comments>
      <category>General</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=54bd260f-4b6a-485f-9719-6d1f5c9464c1</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,54bd260f-4b6a-485f-9719-6d1f5c9464c1.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,54bd260f-4b6a-485f-9719-6d1f5c9464c1.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=54bd260f-4b6a-485f-9719-6d1f5c9464c1</wfw:commentRss>
      <title>We Come to Bury IE6</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,54bd260f-4b6a-485f-9719-6d1f5c9464c1.aspx</guid>
      <link>http://www.58bits.com/blog/2009/11/04/We-Come-To-Bury-IE6.aspx</link>
      <pubDate>Wed, 04 Nov 2009 13:15:21 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;When the desired death of a browser makes it into a &lt;a href="http://www.spectrum.ieee.org/telecom/internet/we-come-to-bury-ie6" target="_blank"&gt;full-page editorial of IEEE Spectrum&lt;/a&gt; – you know that the issue is finally starting to gain some traction. The tech blogosphere communities have been making plenty of noise about this for a while now. And I’d love someone to do an ‘economic’ impact analysis for IE6 – both in terms of development and security related incidents.&lt;/p&gt;  &lt;p&gt;I think the Spectrum article (and the referring blog post from Digg) does a good job of describing the issues – corporate restrictions being high on the list of reasons that prevent a user from upgrading. That said I’d rank Microsoft’s failed Vista strategy which resulted in downgrade options to Windows XP being offered by manufacturers, along with the number of illegal and non-updating XP installations out there as just as large a contribution.&lt;/p&gt;  &lt;p&gt;Despite my &lt;a href="http://www.58bits.com/blog/2009/07/11/How-To-Ban-Internet-Explorer-6-From-Your-Site-Using-The-IIS7-Url-Rewrite-Module.aspx" target="_blank"&gt;earlier and naïve attempt&lt;/a&gt; to ban IE6 from my site I’ve now successfully bared the browser using IE conditional comments – which is the only reliable way you can detect this version of IE (you can’t sniff for it reliably). I then display the following :-)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/WeCometoBuryIE6_B6F1/your_browser.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px; display: inline; border-top: 0px; border-right: 0px" title="your_browser" border="0" alt="your_browser" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/WeCometoBuryIE6_B6F1/your_browser_thumb.jpg" width="433" height="299" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=54bd260f-4b6a-485f-9719-6d1f5c9464c1"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,54bd260f-4b6a-485f-9719-6d1f5c9464c1.aspx</comments>
      <category>CSS/XHTML</category>
      <category>General</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=52b0d286-7d24-4eca-abd1-69d971f6ad5e</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,52b0d286-7d24-4eca-abd1-69d971f6ad5e.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,52b0d286-7d24-4eca-abd1-69d971f6ad5e.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=52b0d286-7d24-4eca-abd1-69d971f6ad5e</wfw:commentRss>
      <title>Nikon ViewNX Broken on Windows 7</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,52b0d286-7d24-4eca-abd1-69d971f6ad5e.aspx</guid>
      <link>http://www.58bits.com/blog/2009/10/24/Nikon-ViewNX-Broken-On-Windows-7.aspx</link>
      <pubDate>Sat, 24 Oct 2009 12:15:25 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;I posted &lt;a href="http://www.58bits.com/otherblog/2009/06/12/Nikon-ViewNX-You-Suck.aspx" target="_blank"&gt;my views earlier on Nikon software&lt;/a&gt; – and I’m now pretty sure that Nikon ViewNX is broken on Windows 7. Below is a link to the native Process Monitor log file – filtered for ViewNX after a complete uninstall and re-install to the latest version of ViewNX 1.5.0 – running on the RTM of Windows 7. ViewNX was still performing an endless loop of I/O and registry requests. &lt;/p&gt;  &lt;p&gt;I stopped recording after 1.7 million events (a 182MB log file – compressed to 21MB below).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.58bits.com/download/ViewNX.zip"&gt;ViewNX.zip&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;:-(&lt;/p&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=52b0d286-7d24-4eca-abd1-69d971f6ad5e"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,52b0d286-7d24-4eca-abd1-69d971f6ad5e.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=a4c3fa36-ab75-4709-8531-496b5b1c2a5c</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,a4c3fa36-ab75-4709-8531-496b5b1c2a5c.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,a4c3fa36-ab75-4709-8531-496b5b1c2a5c.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a4c3fa36-ab75-4709-8531-496b5b1c2a5c</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <title>Formal Versus Agile Methodologies</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,a4c3fa36-ab75-4709-8531-496b5b1c2a5c.aspx</guid>
      <link>http://www.58bits.com/blog/2009/09/25/Formal-Versus-Agile-Methodologies.aspx</link>
      <pubDate>Fri, 25 Sep 2009 23:28:41 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;I’ve been an IEEE and Computer Society member for a couple of years now. Trying to keep up with the IEEE publications along with my RSS Reader and tech news has been a challenge – so I’m sure I’ve missed some good stuff along the way.&lt;/p&gt;  &lt;p&gt;However, an article in the September 2009 edition of ‘Computer’ caught my eye: “&lt;a href="http://www2.computer.org/portal/web/csdl/doi/10.1109/MC.2009.284" target="_blank"&gt;Formal Versus Agile: Survival of the Fittest&lt;/a&gt;” by Sue Black, Paul P. Boca, Jonathan P. Bowan, Jason Gorman and Mike Hinchey.&lt;/p&gt;  &lt;p&gt;It’s a great article with good history and an insightful assessment of the current ‘methodologies’ landscape. Unfortunately the article is only available to subscribers of ‘Computer’ at the moment. I hope it will be published more widely in the near future since I think it has a wide appeal.&lt;/p&gt;  &lt;p&gt;The author’s comparison of RAD and Agile was particularly interesting – and the following statement about Agile practises is worth quoting…&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Most teams purporting to be doing agile software development are not applying the level of technical rigor necessary to succeed at it. Most ‘agile’ teams have actually only adopted Scrum’s project-management practise and have failed to effectively adopt ‘the hard disciplines’ like test-driven development, refactoring, pair programming, simple design (writing the simplest code possible to satisfy the customer’s requirements), and continuous integration.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Their description of the major misconception that ‘Agile = Fast’ was also insightful (when it should be about being responsive to ‘change’).&lt;/p&gt;  &lt;p&gt;A great read if you can get hold of it.&lt;/p&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=a4c3fa36-ab75-4709-8531-496b5b1c2a5c"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,a4c3fa36-ab75-4709-8531-496b5b1c2a5c.aspx</comments>
      <category>Enterprise</category>
      <category>General</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=59808b09-609c-40c0-9bc8-509a22fe0d22</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,59808b09-609c-40c0-9bc8-509a22fe0d22.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,59808b09-609c-40c0-9bc8-509a22fe0d22.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=59808b09-609c-40c0-9bc8-509a22fe0d22</wfw:commentRss>
      <title>Projects</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,59808b09-609c-40c0-9bc8-509a22fe0d22.aspx</guid>
      <link>http://www.58bits.com/blog/2009/09/01/Projects.aspx</link>
      <pubDate>Tue, 01 Sep 2009 22:09:39 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;I’m pretty sure that anyone who actually likes to ‘make stuff’ and has been a programmer at least once in their life – has got a short list of pet projects that he/she has started – and maybe even finished :-)&lt;/p&gt;  &lt;p&gt;Here are a few of my ‘pets’.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;CodeDom class generator for VS2005/2008&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="addin-screenshot_01" border="0" alt="addin-screenshot_01" align="left" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Projects_99EE/addin-screenshot_01_3.jpg" width="305" height="94" /&gt;This was an early attempt of mine at writing a Visual Studio Add-in - designed to create a class from a database query, table or stored procedure. There’s a ton of stuff like this out there – but I wanted something that generated the class from the DataTable – SchemaTable of an IReader – so that a class could be generated from any query or shape for use with DTOs, reporting, or a simple domain model. You can choose from C#, VB or C++ to generate the class as well as a number of styles of classes – from a built-in IReader constructor, attribute based mapper, or plain old CLR object (POCO). There also doesn’t have to be any data in the result set for this to work since the SchemaTable will be returned regardless.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Projects_99EE/addin-screenshot_02_4.jpg" target="_blank"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="addin-screenshot_02" border="0" alt="addin-screenshot_02" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Projects_99EE/addin-screenshot_02_thumb_1.jpg" width="464" height="385" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The Add-in also adds an ‘Open Folder’ option to the context menu of all solutions, projects, folders, etc. in Solution Explorer. This feature exists as of VS 2008 – but I wanted it at the top of the context menu – not at the bottom.&lt;/p&gt;  &lt;p&gt;You can download the Add-in here at - &lt;a href="http://www.58bits.com/download/FiftyEightBitsAddin.zip"&gt;FiftyEightBitsAddin.zip&lt;/a&gt; Just unzip and place the contents of the zip file into any one of the Add-in locations for VS2008.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;PreCode Code Snippet Plugin for WLW&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This is an open source project hosted at Codeplex – a plugin for Windows Live Writer that helps to format code snippets before pasting them into a blog post (or elsewhere). It was written for the excellent &lt;a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter" target="_blank"&gt;SyntaxHighlther from Alex Gorbatchev&lt;/a&gt;. It’s a WPF app – and also includes a standalone desktop version for pasting formatted code into any app (ideal for &lt;a href="http://stackoverflow.com/" target="_blank"&gt;Stack Overflow&lt;/a&gt;). Please don’t look at this as a reference WPF app though – it’s more than just a little ‘hacky’. The app that follows is my ‘better’ WPF effort. Visit &lt;a title="http://www.codeplex.com/precode" href="http://www.codeplex.com/precode"&gt;http://www.codeplex.com/precode&lt;/a&gt; for more details, the source code and the installer.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://www.codeplex.com/precode" target="_blank"&gt;&lt;img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="precode_screenshot" border="0" alt="precode_screenshot" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Projects_99EE/precode_screenshot_3.jpg" width="507" height="498" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Gallery Builder – Desktop and Web&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you follow the &lt;a href="http://www.58bits.com/photos" target="_blank"&gt;Photos&lt;/a&gt; link above – you’ll see the results of this application. Yet another gallery builder app – however I’ve spent a bit of time on this one – choosing a specific architecture that I think represents a good balance between desktop and web server processing for small to medium size collections of photos. I’ll be hosting a Wiki soon with docs and the full download including the HttpModule that is used display galleries online (along with a sample app and extensibility features). The module can be integrated into any site and includes full Atom and Rss syndication support, nested galleries, as well as good caching/304 response support.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Projects_99EE/0.9.8.1000_2.jpg" target="_blank"&gt;&lt;img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="0.9.8.1000" border="0" alt="0.9.8.1000" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Projects_99EE/0.9.8.1000_thumb.jpg" width="512" height="427" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;A pre-release version of the desktop application can be downloaded from the link below (although it’s not a whole lot of good without the web component). Hand rolling a complete set of control templates for a custom theme in WPF was a great way to get to know the inside of WPF.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;NOTE: &lt;/strong&gt;If there are no other WPF apps on your machine – and this application is the first WPF application you start – the ‘cold’ loading time for a WPF app is very long. Subsequent application loading times are what you’d expect.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.58bits.com/download/GalleryBuilder_0.9.9.1000.zip"&gt;GalleryBuilder_0.9.9.1000.zip&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Yet another Task Management App - DotNetTime&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.58bits.com/dnt" target="_blank"&gt;&lt;img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="dnt_screenshot" border="0" alt="dnt_screenshot" align="left" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Projects_99EE/dnt_screenshot_3.jpg" width="409" height="365" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Yet another task/project list manager; only I actually use this one. This is an ASP.Net Model View Presenter application (and hopefully my last Webforms app). I use this to track my own time working on projects or just to ‘monitor’ my own time in general. Implementing multi-language support was a good learning exercise – and until recently this had been my ‘workbench’ throw anything at it hobby app. Now that charting controls are available &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=130F7986-BF49-4FE5-9CA8-910AE6EA442C&amp;amp;displaylang=en" target="_blank"&gt;free from Microsoft&lt;/a&gt; – I’ll be adding some charts to the reporting page. Feel free to register and have a play – it’s very basic – but it does what I need. Be gentle too if you’re into web hackery– this was built &lt;strong&gt;&lt;em&gt;before&lt;/em&gt; &lt;/strong&gt;my formal introduction to the world of &lt;a href="http://www.58bits.com/blog/2009/05/20/MSc-In-Information-Security.aspx" target="_blank"&gt;application security&lt;/a&gt; and so I wouldn’t be surprised at all if there were XSS or CSRF vulnerabilities (although there shouldn’t be any SQL injection weaknesses – he says).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.58bits.com/dnt" target="_blank"&gt;http://www.58bits.com/dnt&lt;/a&gt;&lt;/p&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=59808b09-609c-40c0-9bc8-509a22fe0d22"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,59808b09-609c-40c0-9bc8-509a22fe0d22.aspx</comments>
      <category>C#</category>
      <category>General</category>
      <category>Visual Studio</category>
      <category>WPF</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=0c43b094-d9ba-4fb3-a8f6-a8ebc16497f7</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,0c43b094-d9ba-4fb3-a8f6-a8ebc16497f7.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,0c43b094-d9ba-4fb3-a8f6-a8ebc16497f7.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=0c43b094-d9ba-4fb3-a8f6-a8ebc16497f7</wfw:commentRss>
      <title>Get XElement Value with Default</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,0c43b094-d9ba-4fb3-a8f6-a8ebc16497f7.aspx</guid>
      <link>http://www.58bits.com/blog/2009/08/02/Get-XElement-Value-With-Default.aspx</link>
      <pubDate>Sun, 02 Aug 2009 01:24:20 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;Thanks to this post at &lt;a href="http://brokenbokken.wordpress.com/2007/11/27/net-dojo-methods-with-a-generic-return-type/" target="_blank"&gt;.Net Dojo&lt;/a&gt;, here’s a utility method for getting a safe value from an XElement, returning a default value if the element was not found.&lt;/p&gt;  &lt;pre class="brush: csharp; auto-links: false;"&gt;public static T GetElementValue&amp;lt;T&amp;gt;(XElement parent, string elementId, T defaultValue) where T : IConvertible
{
    XElement element = parent.Element(elementId);
    if (element != null)           
        return (T)Convert.ChangeType(element.Value, typeof(T), CultureInfo.InvariantCulture);           
    else
        return defaultValue;   
}    &lt;/pre&gt;

&lt;p&gt;I’ve been using this combined with .Net 3.0 object initializers to re-hydrate objects from Xml with safe values, like…&lt;/p&gt;

&lt;pre class="brush: csharp; auto-links: false;"&gt;var myClass = new MyClass() 
{ 
    Name = GetElementValue(parent, &amp;quot;Name&amp;quot;, String.Empty),
    IsDefault = GetElementValue(parent, &amp;quot;IsDefault &amp;quot;, true),
    YearsLeft = GetElementValue(parent, &amp;quot;Yearsleft&amp;quot;, 100)
}&lt;/pre&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=0c43b094-d9ba-4fb3-a8f6-a8ebc16497f7"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,0c43b094-d9ba-4fb3-a8f6-a8ebc16497f7.aspx</comments>
      <category>C#</category>
      <category>Utilities</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=c4c4312d-d1f7-4d15-9721-723c9d3ad16d</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,c4c4312d-d1f7-4d15-9721-723c9d3ad16d.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,c4c4312d-d1f7-4d15-9721-723c9d3ad16d.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=c4c4312d-d1f7-4d15-9721-723c9d3ad16d</wfw:commentRss>
      <slash:comments>8</slash:comments>
      <title>ASP.NET MVC 304 Not Modified Filter for Syndication Content</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,c4c4312d-d1f7-4d15-9721-723c9d3ad16d.aspx</guid>
      <link>http://www.58bits.com/blog/2009/07/26/ASPNET-MVC-304-Not-Modified-Filter-For-Syndication-Content.aspx</link>
      <pubDate>Sun, 26 Jul 2009 06:35:50 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;Earlier I posted about a &lt;a href="http://www.58bits.com/blog/2009/05/02/GZip-And-Deflate-Compression-Filter-For-ASPNet-MVC.aspx" target="_blank"&gt;compression filter for ASP.NET MVC&lt;/a&gt; that was the product of two other posts on compression and QValues. I’ve also seen a couple of posts describing different approaches to creating syndication content via ASP.NET MVC – RSS or Atom feeds. Here are two suggestions – one at &lt;a href="http://www.developerzen.com/2009/01/11/aspnet-mvc-rss-feed-action-result/" target="_blank"&gt;DeveloperZen&lt;/a&gt; and the other at &lt;a href="http://stackoverflow.com/questions/11915/rss-feeds-in-asp-net-mvc" target="_blank"&gt;Stack Overflow&lt;/a&gt; that both use an RssActionResult subclass of &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.actionresult.aspx" target="_blank"&gt;ActionResult&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;What was missing was a 304 Not Modified filter – so that feeds that have not changed can return a 304 Not Modified HTTP Response - saving bandwidth and improving performance of the consumer.&lt;/p&gt;  &lt;p&gt;Here’s my attempt at putting it all together using a custom NotModifiedFilter, the CompressionFilter and a SyndicationActionResult class.&lt;/p&gt;  &lt;p&gt;First the NotModifiedFilter. This article at the &lt;a href="http://edn.embarcadero.com/article/38123" target="_blank"&gt;Embarcadero Developer Network&lt;/a&gt; was very helpful (along with the &lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.5" target="_blank"&gt;W3C standard for 304 Not Modified&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;Here’s the filter.&lt;/p&gt;  &lt;pre class="brush: xml; auto-links: false;"&gt;public class NotModifiedFilterAttribute : ActionFilterAttribute
{
    public override void OnResultExecuted(ResultExecutedContext filterContext)
    {
        var response = filterContext.HttpContext.Response;
        var request = filterContext.HttpContext.Request;           

        if ((IsSourceModified(request, response) == false))
        {
            response.SuppressContent = true;
            response.StatusCode = 304;
            response.StatusDescription = &amp;quot;Not Modified&amp;quot;;
            // Explicitly set the Content-Length header so the client doesn't wait for
            // content but keeps the connection open for other requests
            response.AddHeader(&amp;quot;Content-Length&amp;quot;, &amp;quot;0&amp;quot;);
        }
    }
}&lt;/pre&gt;

&lt;p&gt;And here’s the helper method that tests for modified content.&lt;/p&gt;

&lt;pre class="brush: xml; auto-links: false;"&gt;private static bool IsSourceModified(HttpRequestBase request, HttpResponseBase response)
{                  
    bool dateModified = false;
    bool eTagModified = false;

    string requestETagHeader = request.Headers[&amp;quot;If-None-Match&amp;quot;] ?? string.Empty;
    string requestIfModifiedSinceHeader = request.Headers[&amp;quot;If-Modified-Since&amp;quot;] ?? string.Empty;            
    DateTime requestIfModifiedSince;                    
    DateTime.TryParse(requestIfModifiedSinceHeader, out requestIfModifiedSince);
    
    string responseETagHeader = response.Headers[&amp;quot;ETag&amp;quot;] ?? string.Empty;
    string responseLastModifiedHeader = response.Headers[&amp;quot;Last-Modified&amp;quot;] ?? string.Empty;
    DateTime responseLastModified;
    DateTime.TryParse(responseLastModifiedHeader, out responseLastModified);

    if (requestIfModifiedSince != DateTime.MinValue &amp;amp;&amp;amp; responseLastModified != DateTime.MinValue)
    {
        if (responseLastModified &amp;gt; requestIfModifiedSince)
        {
            TimeSpan diff = responseLastModified - requestIfModifiedSince;
            if (diff &amp;gt; TimeSpan.FromSeconds(1))
            {
                dateModified = true;
            }
        }
    }
    else
    {
        dateModified = true;
    }

    //Leave the default for eTagModified = false so that if we
    //don't get an ETag from the server we will rely on the fileDateModified only           
    if (String.IsNullOrEmpty(responseETagHeader) == false)
    {
        eTagModified = responseETagHeader.Equals(requestETagHeader, StringComparison.Ordinal) == false;
    }

    return (dateModified || eTagModified);    
}&lt;/pre&gt;

&lt;p&gt;And lastly – here’s my SyndicationActionResult class which uses a Func&amp;lt;FeedData&amp;gt; delegate to get the feed data – and so can be used for any type of feed – Rss, Atom, Sitemaps etc. (FeedData contains the feed content as well as the last modified date and the ETag). Not sure if I’m guilty of &lt;a href="http://en.wikipedia.org/wiki/Cargo_cult_programming" target="_blank"&gt;cargo cult programming&lt;/a&gt; here since I was a little unsure about setting the ‘Last-Modified’ header manually instead of using response.Cache.SetLastModified() method. However the latter was not showing up in the HttpContext of the OnResultExecuted method in the filter. Maybe the runtime moves this value into the headers collection later in the pipeline.&lt;/p&gt;

&lt;pre class="brush: xml; auto-links: false;"&gt;public class SyndicationActionResult : ActionResult
{
    public Func&amp;lt;FeedData&amp;gt; ActionDelegate { get; set; }
    
    public override void ExecuteResult(ControllerContext context)
    {
        if (ActionDelegate != null)
        {
            var response = context.HttpContext.Response;
            var data = ActionDelegate.Invoke() as FeedData;
            if (data != null)
            {
                response.ContentType = data.ContentType;
                response.AppendHeader(&amp;quot;Cache-Control&amp;quot;, &amp;quot;private&amp;quot;);
                response.AppendHeader(&amp;quot;Last-Modified&amp;quot;, data.LastModifiedDate.ToString(&amp;quot;r&amp;quot;));
                //response.Cache.SetLastModified(data.LastModifiedDate);
                response.AppendHeader(&amp;quot;ETag&amp;quot;, String.Format(&amp;quot;\&amp;quot;{0}\&amp;quot;&amp;quot;, data.ETag));
                response.Output.WriteLine(data.Content);
                response.StatusCode = 200;
                response.StatusDescription = &amp;quot;OK&amp;quot;;
            }
        }
    }
}&lt;/pre&gt;

&lt;p&gt;Note that we write the content to the response.Output stream - however if the NotModifiedFilter tells us nothing has changed – then this will be suppressed – (although it is important that the ETag remains).&lt;/p&gt;

&lt;p&gt;And very lastly - here's the Action in my SyndicationController class that puts it all together, and in this case – is used to provide the aggregate Atom feed on my home page at &lt;a href="http://www.58bits.com" target="_blank"&gt;http://www.58bits.com&lt;/a&gt;.&lt;/p&gt;

&lt;pre class="brush: xml; auto-links: false;"&gt;[AcceptVerbs(HttpVerbs.Get)]
[NotModifiedFilter(Order = 1)]
[CompressFilter(Order = 2)]
public SyndicationActionResult SiteFeedAtom()
{
    return new SyndicationActionResult() { ActionDelegate = SyndicationHelper.GetAggregateAtomFeed };
}&lt;/pre&gt;

&lt;p&gt;As &lt;a href="http://www.hanselman.com/blog/" target="_blank"&gt;Scott&lt;/a&gt; sometimes says -&amp;#160; it may be&amp;#160; “poo”… or it maybe useful. At least it seems to be working ok for me, although suggestions on how any of it might be improved would be greatly appreciated.&lt;/p&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=c4c4312d-d1f7-4d15-9721-723c9d3ad16d"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,c4c4312d-d1f7-4d15-9721-723c9d3ad16d.aspx</comments>
      <category>ASP.Net</category>
      <category>C#</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=e298af50-8ebc-4d6d-aff6-0f4d4bf570ff</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,e298af50-8ebc-4d6d-aff6-0f4d4bf570ff.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,e298af50-8ebc-4d6d-aff6-0f4d4bf570ff.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e298af50-8ebc-4d6d-aff6-0f4d4bf570ff</wfw:commentRss>
      <title>The Best Windows 7 Feature</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,e298af50-8ebc-4d6d-aff6-0f4d4bf570ff.aspx</guid>
      <link>http://www.58bits.com/blog/2009/07/17/The-Best-Windows-7-Feature.aspx</link>
      <pubDate>Fri, 17 Jul 2009 16:13:03 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;I’m still freak’n over how solid, fast and all-round great Windows 7 is. The first time ever an OS upgrade (without repaving the machine) actually feels like I did a fresh install.&lt;/p&gt;  &lt;p&gt;Vista drove me nuts – both because of its sluggishness, and because of a totally failed file and folder management strategy. At the height of my frustration I was experimenting with &lt;a href="http://www.ghisler.com/" target="_blank"&gt;Total Commander&lt;/a&gt;, &lt;a href="http://www.gpsoft.com.au/" target="_blank"&gt;Opus 9&lt;/a&gt; and a couple of other file management applications in an effort to rid my self of the the ‘built in’ windows explorer. Folders did not remember the view or view preferences between sessions. Even worse was Vista’s attempt to guess the contents of a folder and ‘adapt’ accordingly. Maybe one day when we’re all in the cloud – or when the file system has been abstracted away by a content and keyword management system we won’t need conventional access to the file system per se – but we’re not there yet – and I do.&lt;/p&gt;  &lt;p&gt;Here’s what they’ve done in Windows 7 – which is exactly right. They’ve separated their attempt at managing views based on content – from a regular file management window (and all explorer windows always remember the last view used).&lt;/p&gt;  &lt;p&gt;So for example – if I’m looking at photos via the Picture Library – it looks like this.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Library" border="0" alt="Library" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/TheBestWindows7Feature_14573/Library_3.png" width="626" height="476" /&gt; &lt;/p&gt;  &lt;p&gt;…with extra columns for tags and picture information. It’s a media specific view and that’s fine. Of course it could be a thumbnails view – but the important thing is that in details view – content specific columns appear.&lt;/p&gt;  &lt;p&gt;If I need a ‘real’ file system window though – say because I want to quickly sort by file type or some other file system criteria – then I navigate to the same folder via the file system using a ‘regular’ explorer window (Windows Key – E) – which looks like this.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Folder" border="0" alt="Folder" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/TheBestWindows7Feature_14573/Folder_3.png" width="630" height="474" /&gt;&lt;/p&gt;  &lt;p&gt;The default view for folders when you’ve entered them not via a Library but via the file system – is the ‘General Items’ view – which works like you’d expect it to when you need a ‘regular’ file management window. &lt;/p&gt;  &lt;p&gt;What a relief. It works. It makes sense, and I can use Windows Explorer again.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:40299bed-6a9b-4560-af22-792a146916a2" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Windows+7" rel="tag"&gt;Windows 7&lt;/a&gt;&lt;/div&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=e298af50-8ebc-4d6d-aff6-0f4d4bf570ff"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,e298af50-8ebc-4d6d-aff6-0f4d4bf570ff.aspx</comments>
      <category>Other Tech</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=3e491ea6-f0ef-4abf-baae-f866ebd5cbfd</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,3e491ea6-f0ef-4abf-baae-f866ebd5cbfd.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,3e491ea6-f0ef-4abf-baae-f866ebd5cbfd.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=3e491ea6-f0ef-4abf-baae-f866ebd5cbfd</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <title>How to ban Internet Explorer 6 from your Site Using the IIS7 Url Rewrite Module</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,3e491ea6-f0ef-4abf-baae-f866ebd5cbfd.aspx</guid>
      <link>http://www.58bits.com/blog/2009/07/11/How-To-Ban-Internet-Explorer-6-From-Your-Site-Using-The-IIS7-Url-Rewrite-Module.aspx</link>
      <pubDate>Sat, 11 Jul 2009 10:39:08 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;UPDATE 12/07/2009&lt;/font&gt;&lt;/strong&gt; - As Shirley Boyle sang - &amp;quot;I dreamed a dream&amp;quot;. The exercise below was great for learning how to use the IIS7 Url Rewrite Module - but there is a long &lt;a href="http://www.zytrax.com/tech/web/browser_ids.htm" target="_blank"&gt;list of user agents&lt;/a&gt; that contain the string &amp;quot;compatible; MSIE 6.0;&amp;quot; including the MSN spider and some transparent proxies. Internet Explorer 6 is the browser that refuses to die. :-(&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;ORIGINAL POST&lt;/strong&gt; - This one took a little while to figure out along with a careful read of the &lt;a href="http://learn.iis.net/page.aspx/465/url-rewrite-module-configuration-reference/#UsingServerVars" target="_blank"&gt;reference docs for the IIS7 Url Rewrite Module&lt;/a&gt;. I was banging my head against the wall for a few minutes with {USER_AGENT} before reading the fine print… the HTTP prefix bit in particular.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;All dash (“-”) symbols in the HTTP header name are converted to underscore symbols (“_”).      &lt;br /&gt;All letters in the HTTP header name are converted to capital case.       &lt;br /&gt;“HTTP_” prefix is added to the header name.       &lt;br /&gt;For example, in order to access the HTTP header “user-agent” from a rewrite rule, you can use the {HTTP_USER_AGENT} server variable.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;And here’s the result…&lt;/p&gt;  &lt;pre class="brush: xml; auto-links: false;"&gt;&amp;lt;rule name=&amp;quot;BlockIE6&amp;quot; stopProcessing=&amp;quot;true&amp;quot;&amp;gt;
  &amp;lt;match url=&amp;quot;.*&amp;quot; /&amp;gt;
  &amp;lt;conditions&amp;gt;
    &amp;lt;add input=&amp;quot;{HTTP_USER_AGENT}&amp;quot; pattern=&amp;quot;MSIE 6&amp;quot; /&amp;gt;
    &amp;lt;add input=&amp;quot;{REQUEST_FILENAME}&amp;quot; matchType=&amp;quot;IsFile&amp;quot; negate=&amp;quot;true&amp;quot; /&amp;gt;
    &amp;lt;add input=&amp;quot;{URL}&amp;quot; negate=&amp;quot;true&amp;quot; pattern=&amp;quot;ie6&amp;quot; /&amp;gt;
  &amp;lt;/conditions&amp;gt;
  &amp;lt;action type=&amp;quot;Redirect&amp;quot; url=&amp;quot;ie6&amp;quot; redirectType=&amp;quot;Permanent&amp;quot; /&amp;gt;
&amp;lt;/rule&amp;gt;&lt;/pre&gt;
It’s really really important that you do two things: 1) Prevent the redirect from redirecting static content – like script files and style sheets, ala the {REQUEST_FILENAME} negative condition, and 2) You also check the Url to see if it’s the redirected Url – i.e. they’ve already been redirected – otherwise you’ll get an endless redirect loop. In this case I’m sending them to the url “ie6” which is an action on a route in ASP.Net MVC – displaying a download page with some ‘alternatives’ :-) 

&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=3e491ea6-f0ef-4abf-baae-f866ebd5cbfd"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,3e491ea6-f0ef-4abf-baae-f866ebd5cbfd.aspx</comments>
      <category>ASP.Net</category>
      <category>CSS/XHTML</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=257b90a9-cd32-447d-8c07-90b1762e5506</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,257b90a9-cd32-447d-8c07-90b1762e5506.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,257b90a9-cd32-447d-8c07-90b1762e5506.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=257b90a9-cd32-447d-8c07-90b1762e5506</wfw:commentRss>
      <title>The Functional Renaissance</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,257b90a9-cd32-447d-8c07-90b1762e5506.aspx</guid>
      <link>http://www.58bits.com/blog/2009/07/08/The-Functional-Renaissance.aspx</link>
      <pubDate>Wed, 08 Jul 2009 18:09:39 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/fsharp/default.aspx" target="_blank"&gt;&lt;img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="fsharp" border="0" alt="fsharp" align="left" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/TheFunctionalRenaissance_D32/fsharp_3.jpg" width="161" height="120" /&gt;&lt;/a&gt;I recently watched Luca Bolognese’s presentation at last years &lt;a href="http://channel9.msdn.com/pdc2008/TL11/" target="_blank"&gt;PDC on F#&lt;/a&gt;. A really great presentation.&lt;/p&gt;  &lt;p&gt;I’ve also been listening to Steve Vinoski’s podcasts on the &lt;a href="http://www2.computer.org/portal/web/computingnow/functionalweb" target="_blank"&gt;The Functional Web&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;There’s definitely stuff up in this area now. Coming from a non-comp-sci background – and only ever having written statically typed and imperative code (sad I know) – I’m curious to see where this will all lead. &lt;a href="http://en.wikipedia.org/wiki/Haskell_%28programming_language%29" target="_blank"&gt;Haskell&lt;/a&gt; , &lt;a href="http://en.wikipedia.org/wiki/Erlang_%28programming_language%29" target="_blank"&gt;Erlang&lt;/a&gt;, and &lt;a href="http://en.wikipedia.org/wiki/Scala_%28programming_language%29" target="_blank"&gt;Scala&lt;/a&gt; are all on the rise. &lt;a href="http://en.wikipedia.org/wiki/CouchDB" target="_blank"&gt;CouchDB&lt;/a&gt; (backed I think by &lt;a href="http://en.wikipedia.org/wiki/Lucene" target="_blank"&gt;Lucene&lt;/a&gt; for search) and even &lt;a href="http://yaws.hyber.org/" target="_blank"&gt;Yaws&lt;/a&gt; (yet another web server) – are just two of several significant projects written in Erlang. &lt;/p&gt;  &lt;p&gt;I think it was Martin Fowler who said that the best way to be a better programmer – is to learn another language, and F# is now on my list of things to do.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:3cc8e1fd-78db-48ed-a634-f19ebb9c31a8" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/fsharp" rel="tag"&gt;fsharp&lt;/a&gt;,&lt;a href="http://technorati.com/tags/haskell" rel="tag"&gt;haskell&lt;/a&gt;,&lt;a href="http://technorati.com/tags/erlang" rel="tag"&gt;erlang&lt;/a&gt;,&lt;a href="http://technorati.com/tags/scala" rel="tag"&gt;scala&lt;/a&gt;&lt;/div&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=257b90a9-cd32-447d-8c07-90b1762e5506"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,257b90a9-cd32-447d-8c07-90b1762e5506.aspx</comments>
      <category>General</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=6111d784-4cc3-4eae-bbf0-38d1cc306f18</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,6111d784-4cc3-4eae-bbf0-38d1cc306f18.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,6111d784-4cc3-4eae-bbf0-38d1cc306f18.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=6111d784-4cc3-4eae-bbf0-38d1cc306f18</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <title>iPoo</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,6111d784-4cc3-4eae-bbf0-38d1cc306f18.aspx</guid>
      <link>http://www.58bits.com/blog/2009/07/08/iPoo.aspx</link>
      <pubDate>Wed, 08 Jul 2009 15:47:00 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;What will those crazy folks at &lt;a href="http://www.apple.com/" target="_blank"&gt;Apple&lt;/a&gt; think of next?&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/iPoo_FAF9/AGB_9599_2.jpg" target="_blank"&gt;&lt;img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="AGB_9599" border="0" alt="AGB_9599" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/iPoo_FAF9/AGB_9599_thumb.jpg" width="568" height="380" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=6111d784-4cc3-4eae-bbf0-38d1cc306f18"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,6111d784-4cc3-4eae-bbf0-38d1cc306f18.aspx</comments>
      <category>General</category>
      <category>Hardware</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=a1e77be4-6650-4a4a-b409-f47c0aa5a460</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,a1e77be4-6650-4a4a-b409-f47c0aa5a460.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,a1e77be4-6650-4a4a-b409-f47c0aa5a460.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a1e77be4-6650-4a4a-b409-f47c0aa5a460</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <title>BlackBerry Tour</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,a1e77be4-6650-4a4a-b409-f47c0aa5a460.aspx</guid>
      <link>http://www.58bits.com/blog/2009/07/05/BlackBerry-Tour.aspx</link>
      <pubDate>Sun, 05 Jul 2009 05:43:41 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;&lt;a href="http://na.blackberry.com/eng/devices/blackberrytour/" target="_blank"&gt;&lt;img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="2009-07-01_083947_270x355" border="0" alt="2009-07-01_083947_270x355" align="left" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/BlackBerryTour_B2F8/2009-07-01_083947_270x355_3.jpg" width="212" height="278" /&gt;&lt;/a&gt; I'm still in watch and wait mode - being torn between the &lt;a href="http://www.apple.com/iphone/" target="_blank"&gt;iPhone&lt;/a&gt; 3GS and a &lt;a href="http://www.backberry.com/" target="_blank"&gt;BlackBerry&lt;/a&gt; device. &lt;/p&gt;  &lt;p&gt;I partly want to own an &lt;a href="http://www.apple.com/iphone/" target="_blank"&gt;iPhone&lt;/a&gt; just to be part of the &lt;a href="http://www.apple.com/iphone/" target="_blank"&gt;iPhone&lt;/a&gt; phenomena - not to mention use the device that has totally changed the landscape of mobile communication. &lt;/p&gt;  &lt;p&gt;I also really admire the BlackBerry devices. I noticed a few reviews for the new &lt;a href="http://na.blackberry.com/eng/devices/blackberrytour/" target="_blank"&gt;BlackBerry Tour&lt;/a&gt; - and thought 'oh that's nice'. Great specs - a refinement of the BlackBerry World Edition and Bold all rolled up into one - and then the bottom fell out. No WiFi. ? WTF? Here’s a good review of the &lt;a href="http://crackberry.com/blackberry9630review" target="_blank"&gt;Tour&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Still waiting and watching....&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7e6bd0b6-6b89-4f29-bcd7-db6ca4361d9c" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/blackberry" rel="tag"&gt;blackberry&lt;/a&gt;,&lt;a href="http://technorati.com/tags/iphone" rel="tag"&gt;iphone&lt;/a&gt;&lt;/div&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=a1e77be4-6650-4a4a-b409-f47c0aa5a460"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,a1e77be4-6650-4a4a-b409-f47c0aa5a460.aspx</comments>
      <category>Hardware</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=09803c9e-6689-4eb7-879d-132f2179d547</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,09803c9e-6689-4eb7-879d-132f2179d547.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,09803c9e-6689-4eb7-879d-132f2179d547.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=09803c9e-6689-4eb7-879d-132f2179d547</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <title>How to Compile a WPF Application as a Class Library</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,09803c9e-6689-4eb7-879d-132f2179d547.aspx</guid>
      <link>http://www.58bits.com/blog/2009/06/25/How-To-Compile-A-WPF-Application-As-A-Class-Library.aspx</link>
      <pubDate>Thu, 25 Jun 2009 06:17:09 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;Charles Petzold’s book, &lt;a href="http://www.charlespetzold.com/wpf/" target="_blank"&gt;Applications = Code + Markup&lt;/a&gt; - received some critical press for not being very pretty. And it’s true that there’s a lot of text and code listings but (and as you’ll see below), he &lt;strong&gt;&lt;em&gt;was&lt;/em&gt;&lt;/strong&gt; methodical. &lt;/p&gt;  &lt;p&gt;I recently wanted to upgrade a Windows Live Writer plug-in I’d written to use the Windows Presentation Framework (WPF) – instead of WinForms and a custom UI library. &lt;/p&gt;  &lt;p&gt;However my first attempt to compile the application as a Class Library resulted in the following error…&lt;/p&gt;  &lt;blockquote&gt;“Library project file cannot specify ApplicationDefinition element”.&lt;/blockquote&gt;  &lt;p&gt;Thankfully I’d remembered the opening chapters of Charles’ book where he spent considerable time explaining the creation of the application class and initial window. The trick in this case is to remove the App.xaml file. You then need to create your own start-up class – like Program.cs – as shown below, and the application will compile fine as either a Windows Application or Class Library. In the example below extra parameters are passed to the constructor of the main window which is opened as a Dialog – and then checked for the DialogResult value when the window is closed.&lt;/p&gt;  &lt;pre class="brush: csharp; auto-links: false;"&gt;public class Program : Application
{
    [STAThread]
    public static void Main()
    {
        var app = new Program();
        app.Run();
    }

    protected override void OnStartup(StartupEventArgs args)
    {
        base.OnStartup(args);

        var window = new PreCodeWindow(new PreCodeSettings(), PreCodeWindow.Mode.StandAlone);
        window.ShowDialog();
        if (window.DialogResult.HasValue &amp;amp;&amp;amp; window.DialogResult.Value)
        {
            System.Diagnostics.Debug.WriteLine(&amp;quot;OK&amp;quot;);
            Clipboard.SetText(window.Code);
        }
        else
        {
            System.Diagnostics.Debug.WriteLine(&amp;quot;Not OK&amp;quot;);
        }        
    }
}&lt;/pre&gt;

&lt;p&gt;The downside to this approach is that you no longer have an application level location for placing resource dictionaries and other shared objects - and so these will need to be placed in each window as required.&lt;/p&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=09803c9e-6689-4eb7-879d-132f2179d547"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,09803c9e-6689-4eb7-879d-132f2179d547.aspx</comments>
      <category>C#</category>
      <category>WPF</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=36ac2f10-78a1-4796-9b46-82457061ad46</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,36ac2f10-78a1-4796-9b46-82457061ad46.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,36ac2f10-78a1-4796-9b46-82457061ad46.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=36ac2f10-78a1-4796-9b46-82457061ad46</wfw:commentRss>
      <title>IIS7 StaticContent and ClientCache Settings</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,36ac2f10-78a1-4796-9b46-82457061ad46.aspx</guid>
      <link>http://www.58bits.com/blog/2009/06/13/IIS7-StaticContent-And-ClientCache-Settings.aspx</link>
      <pubDate>Sat, 13 Jun 2009 00:58:35 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;Yet another great feature of IIS7&amp;#160; - declarative static content cache settings. It took a little detective work to find the settings for this feature – including a helpful post from &lt;a href="http://www.joergjooss.de/archive/2007/04/29/http-caching-mysteries-part-2-static-resource-zombies-iis-7.aspx" target="_blank"&gt;Jörg Jooss&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;I wanted to be able to set the client cache settings for the static content of a site I host at &lt;a href="http://www.orcsweb.com/" target="_blank"&gt;ORCS Web&lt;/a&gt;. In the past – unless offered by the control panel of your shared hosting provider – this would have meant emailing support and asking them to set the client cache header settings for the required directory in IIS6. In IIS7 this can be set now in the &amp;lt;system.webserver&amp;gt; section.&lt;/p&gt;  &lt;p&gt;Note: If you’re going to try this on your local machine first, you will need to unlock the staticContent section in IIS7 (from the machine level) using the following appcmd…&lt;/p&gt;  &lt;p&gt;appcmd unlock config /section:staticContent&lt;/p&gt;  &lt;p&gt;You can also use appcmd to create the static content cache settings as shown in Jörg’s post above, which will add the correct section to your web.config – or you can directly edit/create the web.config file for the required directory. &lt;/p&gt;  &lt;p&gt;I chose to hand edit the web.config – creating a new web.config located in the directory with the static content (i.e. images, style sheets, script files – all under the ‘assets’ directory in my case)&lt;/p&gt;  &lt;pre class="brush: xml; auto-links: false;"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;
&amp;lt;configuration&amp;gt;
  &amp;lt;system.webServer&amp;gt;
    &amp;lt;staticContent&amp;gt;
      &amp;lt;clientCache cacheControlCustom=&amp;quot;private&amp;quot; cacheControlMode=&amp;quot;UseMaxAge&amp;quot; cacheControlMaxAge=&amp;quot;3.00:00:00&amp;quot; /&amp;gt;
    &amp;lt;/staticContent&amp;gt;
  &amp;lt;/system.webServer&amp;gt;
&amp;lt;/configuration&amp;gt;&lt;/pre&gt;

&lt;p&gt;A couple of things to note about these settings. Firstly – you can add any custom cache control header setting using the cacheControlCustom attribute (e.g. no-store, must-revalidate, private, public etc). Secondly using the http 1.1 max-age setting – you can specify days – by using the 1.00 notation for the hours portion of the hh:mm:ss timespan value. So the setting above will set the max-age value to 3 days – or 259200 seconds when you see it in the response header.&lt;/p&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=36ac2f10-78a1-4796-9b46-82457061ad46"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,36ac2f10-78a1-4796-9b46-82457061ad46.aspx</comments>
      <category>ASP.Net</category>
      <category>Enterprise</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=bd6c02ed-8b5c-4b38-942b-9feadd2b828d</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,bd6c02ed-8b5c-4b38-942b-9feadd2b828d.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,bd6c02ed-8b5c-4b38-942b-9feadd2b828d.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=bd6c02ed-8b5c-4b38-942b-9feadd2b828d</wfw:commentRss>
      <title>Bing – Fast, Refreshing and Relaxing</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,bd6c02ed-8b5c-4b38-942b-9feadd2b828d.aspx</guid>
      <link>http://www.58bits.com/blog/2009/06/02/Bing-Fast-Refreshing-And-Relaxing.aspx</link>
      <pubDate>Tue, 02 Jun 2009 15:51:41 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;&lt;a href="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/BingFastRefreshingandRelaxing_14171/AGB_8209_1.jpg"&gt;&lt;img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="AGB_8209" border="0" alt="AGB_8209" align="left" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/BingFastRefreshingandRelaxing_14171/AGB_8209_2.jpg" width="205" height="337" /&gt;&lt;/a&gt;A little experimenting with Microsoft’s new search engine &lt;a href="http://www.bing.com/" target="_blank"&gt;Bing&lt;/a&gt; - and I’m sold. &lt;/p&gt;  &lt;p&gt;Even &lt;a href="http://www.techcrunch.com/2009/06/01/apparently-bing-is-something-of-a-hit/" target="_blank"&gt;TechCrunch&lt;/a&gt; thinks it’s a hit. &lt;/p&gt;  &lt;p&gt;What’s more – it comes in four different flavours! &lt;/p&gt;  &lt;p&gt;When was the last time you searched and felt refreshed and relaxed too! Not even Google can compete with this one. Google in a bottle? Refreshing Google? Not even close... &lt;/p&gt;  &lt;p&gt;Have a Bing today…. :-)&lt;/p&gt;  &lt;p&gt;NOTE: Not kidding about the ‘fast’ part. Don’t know what’s up with Google over the past few months – both their regular search page and access to features such as analytics and webmaster tools are crawling. &lt;a href="http://www.bing.com" target="_blank"&gt;Bing&lt;/a&gt; – so far at least – has been super quick.&lt;/p&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=bd6c02ed-8b5c-4b38-942b-9feadd2b828d"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,bd6c02ed-8b5c-4b38-942b-9feadd2b828d.aspx</comments>
      <category>General</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=a8626d69-a368-4082-8ee4-e33ae1ae96c2</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,a8626d69-a368-4082-8ee4-e33ae1ae96c2.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,a8626d69-a368-4082-8ee4-e33ae1ae96c2.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a8626d69-a368-4082-8ee4-e33ae1ae96c2</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <title>MSc in Information Security</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,a8626d69-a368-4082-8ee4-e33ae1ae96c2.aspx</guid>
      <link>http://www.58bits.com/blog/2009/05/20/MSc-In-Information-Security.aspx</link>
      <pubDate>Wed, 20 May 2009 02:52:54 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;&lt;a href="http://www.isg.rhul.ac.uk/" target="_blank"&gt;&lt;img style="border-right-width: 0px; margin: 5px 10px 10px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="rhulisg_01" border="0" alt="rhulisg_01" align="left" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/MScinInformationSecurity_1183F/rhulisg_01_3.jpg" width="161" height="236" /&gt;&lt;/a&gt;Whew – well after a tough few months I’ve finally completed the coursework towards my masters degree in Information Security - taught by the &lt;a href="http://www.isg.rhul.ac.uk/" target="_blank"&gt;Information Security Group (ISG)&lt;/a&gt; at &lt;a href="http://www.rhul.ac.uk/" target="_blank"&gt;Royal Holloway&lt;/a&gt;,&amp;#160; (via the &lt;a href="http://www.londonexternal.ac.uk/index.html" target="_blank"&gt;University of London External System&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;The online &lt;a href="http://www.londonexternal.ac.uk/prospective_students/postgraduate/holloway/info_security/structure.shtml" target="_blank"&gt;syllabus&lt;/a&gt; is available from the external system and the ISG also provides an &lt;a href="http://www.isg.rhul.ac.uk/msc/info#duration" target="_blank"&gt;overview of the programme here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In addition to the syllabus and ISG’s introduction - I thought that a personal summary might be useful for those considering the programme.&lt;/p&gt;  &lt;p&gt;As per the syllabus – there are four compulsory modules, two optional modules and a final project. A module is really a course, composed of roughly ten units, and lasts the full academic year – from October to the final exam in May.&amp;#160; Here’s a description of the compulsory modules (accurate as of 2008/09 academic year) along with my two chosen optional modules.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;IC01 Security Management&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This course addresses the major themes of security management, including people, processes and technology with particular emphasis on the role of policy in helping to shape an organisation’s security management strategy. The ISO &lt;a href="http://www.27000.org/" target="_blank"&gt;27000&lt;/a&gt; series of standards (ISO 27001 and 27002 in particular) are covered in detail. &lt;a href="http://www.isaca.org/" target="_blank"&gt;COBIT&lt;/a&gt;, &lt;a href="http://www.itil-officialsite.com" target="_blank"&gt;ITIL&lt;/a&gt;, &lt;a href="http://www.isfsecuritystandard.com/" target="_blank"&gt;ISF SOGP&lt;/a&gt; along with the DPA, RIPA, and relevant EU directives are examined. So too is the impact of industry specific regulations such as Sarbanes Oxley, Turnbull, Basel II, and HIPAA. Principles of risk assessment (quantitative/qualitative), compliance, audit, and management including excellent lectures from industry leaders help to round out what is probably the most important message of the course; namely the importance of creating organisational awareness and a culture of information security that includes all aspects of the business (and not just the technology). Some of the material on the course was a little dated but relevant nevertheless.&amp;#160; A ‘must read’ companion to this course is Bruce Schneier’s ‘Secrets and Lies.’&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;IC02 An Introduction to Cryptography and Security Mechanisms&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This was a really great course in cryptography and security mechanisms. Pitched at just the right level for non-maths graduates the course explains the roles of all the major cryptographic primitives, including symmetric key cryptography (block and stream ciphers), hashes, message authentication codes, asymmetric (public) key cryptography and digital signatures. Historical algorithms along with well known algorithms like &lt;a href="http://en.wikipedia.org/wiki/DES" target="_blank"&gt;DES&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard" target="_blank"&gt;AES&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/RSA" target="_blank"&gt;RSA&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Diffie-Hellman_key_exchange" target="_blank"&gt;Diffie-Hellman&lt;/a&gt; and others are explained in detail (including worked examples of RSA modulus, public and private key calculations). The use of these primitives as mechanisms for providing higher level security services like data integrity, data origin authentication, entity authentication (unilateral and mutual authentication protocols) and non-repudiation is also explained in detail. If you can get a copy – you really should ready Stephen Levy’s book ‘Crypto - Secrecy and Privacy in the New Code War’ for a brilliant side-by-side narrative of everything that happened in the crypto world from 1975 onwards. It puts the course into perspective and explains exactly what was happening from the 70s to the 90s in the struggle between governments attempting to regulate crypto, and the commercial interests of the private sector. Simon Singh’s ‘The Code Book’ is also another great companion read.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;IC03 Network Security&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Also a great course on the fundamentals of network communications security including ISO 7498-2, as well as detailed analysis of network, transport, and application level security protocols (IPSec, SSL/TLS, SSH, Kerberos etc.) Other unit subjects included biometrics, email security, wireless networking, firewalls, GSM/UMTS security and an introduction to intrusion detection systems (IDS). One of the texts for this course is Douglas Comer’s brilliant book - &lt;a href="http://www.amazon.com/Computer-Networks-Internets-Douglas-Comer/dp/0136061273/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1224374502&amp;amp;sr=1-1" target="_blank"&gt;'Computer Networks and Internets (5th Edition)&lt;/a&gt;'.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;IC03 Computer Security&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;A bit like IC02 above – there was some important history in this course in terms of the evolution of computer security, operating systems and formal security models including &lt;a href="http://en.wikipedia.org/wiki/David_Elliott_Bell" target="_blank"&gt;Bell Lapadula&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Biba_Model" target="_blank"&gt;Biba&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Chinese_wall" target="_blank"&gt;Chinese Wall&lt;/a&gt;, and &lt;a href="http://en.wikipedia.org/wiki/Clark-Wilson_model" target="_blank"&gt;Clark-Wilson&lt;/a&gt;. For me at least – a real eye opener and it filled in a lot of important gaps – especially in terms of access control and some of the things I’d previously worked on in the areas of authorisation and workflow. Units on security in Pentium architecture, Unix/Linux, IBM z/OS and Windows helped to round off theory with real world and practical examples of applied computer security.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;OPT5 Secure Electronic Commerce and Other Applications&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I’d assumed (which turned out to be partially correct) that this course would be close to my comfort zone given my background in Web and e-commerce development. The course was ok – but I think could be structured better. It’s a pretty large subject (especially the ‘other applications’). The course’s primary objective is to link security specific methodologies to the traditional software development lifecycle as well as emphasise the different security approaches that might be required depending on the context of the application. Information flow analysis, threat modelling and application level risk assessment are covered in the opening units. The TETRA system is used as an initial case study, followed by units on Web application security, Web services security and an excellent unit on identity management. The final units introduce smart cards and the EMV standard. Lots of help from IC02 in this module as secure protocols are described in several units.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;OPT12 Smart Cards/Tokens Security and Applications&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This course was new to the distance learning programme this year (although taught at the ISG for several years). The accompanying text – ‘&lt;a href="http://www.amazon.com/Smart-Cards-Tokens-Security-Applications/dp/0387721975" target="_blank"&gt;Smart Cards, Tokens, Security and Applications&lt;/a&gt;’ edited by two RHUL faculty members, Keith Mayes and Konstantinos Markantonakis – is a tour de force on all things in the smart card world. I’ll never look at my ‘chip and pin’ credit card the same way again. A really great course, benefiting hugely from being fresh and up-to-date. Topics included smart card production, smart card development, smart card for mobile communications (GMS/UMTS), banking and finance (EMV), RFID and contactless smart cards, smart cards in video broadcasting (DVB), an introduction to trusted platform modules (TCG/TPM), the Common Criteria (ISO 15408) for evaluation assurance, ID cards, e-passports and a fascinating unit on smart card attacks and countermeasures from Jacques Fournier at Gemalto.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;In Summary&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Looking back on the last two years, there were times when I wasn’t entirely sure how it was all going to fit together. With the benefit of hindsight I can clearly see the aims of the programme, and how the ISG has attempted to strike a balance between history, fundamentals, and applied techniques in information security.&lt;/p&gt;  &lt;p&gt;The ISG has also put a lot of work into creating the distance learning version of this degree. They’ve experimented with multimedia and an online format which for the most part works well (although I still lean towards printed material and my trusty highlighter). Some of the material however (in particular a couple of the lectures in IC01) is starting to show its age and could do with a refresh – or at the least with a yearly update to the introduction for each module.&lt;/p&gt;  &lt;p&gt;The course has totally changed the way I view the ‘information age’,&amp;#160; information security, and privacy (having now taken the &lt;a href="http://en.wikipedia.org/wiki/Redpill" target="_blank"&gt;‘red pill’&lt;/a&gt;). I’m extremely glad I enrolled and looking forward to putting what I’ve learned into practise on future projects. Also looking forward to taking my time and working on my final project at a more relaxed pace over the next year or so. &lt;/p&gt;  &lt;p&gt;To be continued…&lt;/p&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=a8626d69-a368-4082-8ee4-e33ae1ae96c2"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,a8626d69-a368-4082-8ee4-e33ae1ae96c2.aspx</comments>
      <category>General</category>
      <category>Security</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=8508f718-a18d-4fdb-9b56-95909bbda67a</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,8508f718-a18d-4fdb-9b56-95909bbda67a.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,8508f718-a18d-4fdb-9b56-95909bbda67a.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=8508f718-a18d-4fdb-9b56-95909bbda67a</wfw:commentRss>
      <slash:comments>13</slash:comments>
      <title>Windows 7 RC 7100 Upgrade from Vista</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,8508f718-a18d-4fdb-9b56-95909bbda67a.aspx</guid>
      <link>http://www.58bits.com/blog/2009/05/14/Windows-7-RC-7100-Upgrade-From-Vista.aspx</link>
      <pubDate>Thu, 14 May 2009 05:55:27 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;&lt;img style="border-right-width: 0px; margin: 5px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="windows7" border="0" alt="windows7" align="left" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/Windows7RC7100UpgradefromVista_12FCD/windows7_3.jpg" width="244" height="185" /&gt; Well I figured since the RC was generally available – I’d test the upgrade process from Windows Vista to Windows 7. I chose my ThinkPad T61p as the victim. This is my fully loaded portable dev environment including BitLocker encrypted volumes - and I was a little sceptical at first. A new OS usually means re-paving the machine, but I thought I’d try the upgrade and see how it went.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Get Ready&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;After a complete system backup to a removable drive I launched the setup program from the DVD – from within Vista (not via a booted DVD). Windows 7 setup reported MagicISO, LifeCam, and Skype as software that might not work after the upgrade – so I uninstalled these first. BitLocker had to be disabled as well (not volume decrypted – just disabled). SQL Server 2005 was also on the list of ‘might not work’ after upgrade, but I decided to try upgrading to SQL 2008 Developer Edition afterwards.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Make Yourself a Coffee&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;First word of advice – make yourself a coffee – grab some donuts too – and find something to read, or watch. The upgrade took over three hours to complete. The ‘Gathering files, settings, and programs’ stage took over an hour alone. At 18% of ‘Expanding Windows files’ – the PC rebooted and continued to expand files – but not before 30 minutes of ‘Gathering additional information before expanding files…’&lt;/p&gt;  &lt;p&gt;Transferring files, settings and programs – &lt;strong&gt;1,138,187&lt;/strong&gt; files, settings, and programs to be exact – took another hour (and two reboots).&lt;/p&gt;  &lt;p&gt;Incredibly – it worked!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;First Impressions&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I’ve not been following the Windows 7 story that closely – but most of the reviews report performance improvements, and I like the new task bar and general UI improvements a lot. Will be interesting to see how it goes over the next few days of general use and abuse. A couple of noticeable changes though – disabling Windows Search – also removes the search function from the start menu – it didn’t used to. Also Superfetch – which was on my list of disk thrashing culprits, is enabled by default – and so I’ve turned this off again (the I/O at start-up because of Superfetch was horrendous in Vista – will have to experiment to see if it’s any better in Windows 7) &lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/font&gt;: If you’ve upgraded from Vista as I have – and have previously installed a LifeCam VX-700 – uninstall the LifeCam software before the upgrade and be sure to delete the following file as well C:\Windows\inf\OEM16.INF (check that this is the LifeCam driver inf file) – otherwise the installation of the LifeCam will fail in Windows 7 when it finds the previous LifeCam inf file.&lt;/p&gt;  &lt;p&gt;More soon…&lt;/p&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=8508f718-a18d-4fdb-9b56-95909bbda67a"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,8508f718-a18d-4fdb-9b56-95909bbda67a.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=72eacf2f-1437-4d47-abaf-a4b40c46e5aa</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,72eacf2f-1437-4d47-abaf-a4b40c46e5aa.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,72eacf2f-1437-4d47-abaf-a4b40c46e5aa.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=72eacf2f-1437-4d47-abaf-a4b40c46e5aa</wfw:commentRss>
      <title>RFIDs on the Brain</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,72eacf2f-1437-4d47-abaf-a4b40c46e5aa.aspx</guid>
      <link>http://www.58bits.com/blog/2009/05/10/RFIDs-On-The-Brain.aspx</link>
      <pubDate>Sun, 10 May 2009 04:59:20 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;Speechless really. I’m not often lost for words – but this presentation by Patrick Dixon of Siemens leaves me speechless. Thanks to &lt;a href="http://www.boingboing.net/2009/05/08/rfids-on-the-brain.html" target="_blank"&gt;RFIDs on the Brain&lt;/a&gt; from &lt;a href="http://www.boingboing.net" target="_blank"&gt;Boing Boing&lt;/a&gt; (and &lt;a href="http://rushkoff.com/" target="_blank"&gt;Douglas Rushkoff&lt;/a&gt; via ‘Joe’).&lt;/p&gt; &lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/1vxdaj9Z-Bw&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/1vxdaj9Z-Bw&amp;amp;hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=72eacf2f-1437-4d47-abaf-a4b40c46e5aa"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,72eacf2f-1437-4d47-abaf-a4b40c46e5aa.aspx</comments>
      <category>General</category>
      <category>Security</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=4433c8d8-0955-4c91-b2dc-c31af644ea4c</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,4433c8d8-0955-4c91-b2dc-c31af644ea4c.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,4433c8d8-0955-4c91-b2dc-c31af644ea4c.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=4433c8d8-0955-4c91-b2dc-c31af644ea4c</wfw:commentRss>
      <slash:comments>6</slash:comments>
      <title>GZip and Deflate Compression Filter for ASP.Net MVC</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,4433c8d8-0955-4c91-b2dc-c31af644ea4c.aspx</guid>
      <link>http://www.58bits.com/blog/2009/05/02/GZip-And-Deflate-Compression-Filter-For-ASPNet-MVC.aspx</link>
      <pubDate>Sat, 02 May 2009 21:17:21 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;I’d previously created a compression processor for dynamic content – using this excellent post for &lt;a href="http://www.singular.co.nz/blog/archive/2008/07/06/finding-preferred-accept-encoding-header-in-csharp.aspx" target="_blank"&gt;QValues&lt;/a&gt; by Dave Transom. Also just just discovered this post on creating &lt;a href="http://weblogs.asp.net/rashid/archive/2008/03/28/asp-net-mvc-action-filter-caching-and-compression.aspx" target="_blank"&gt;an action filter for compression&lt;/a&gt; by Kazi Manzur Rashid.&lt;/p&gt;  &lt;p&gt;So combining the two and we have:&lt;/p&gt;  &lt;pre class="brush: csharp; auto-links: false;"&gt;public class CompressFilter : ActionFilterAttribute
{
    public override void OnActionExecuting(ActionExecutingContext filterContext)
    {
        HttpRequestBase request = filterContext.HttpContext.Request;

        // load encodings from header
        QValueList encodings = new QValueList(request.Headers[&amp;quot;Accept-Encoding&amp;quot;]);

        // get the types we can handle, can be accepted and in the defined client preference
        QValue preferred = encodings.FindPreferred(&amp;quot;gzip&amp;quot;, &amp;quot;deflate&amp;quot;, &amp;quot;identity&amp;quot;);

        // if none of the preferred values were found, but the
        // client can accept wildcard encodings, we'll default
        // to Gzip.
        if (preferred.IsEmpty &amp;amp;&amp;amp; encodings.AcceptWildcard &amp;amp;&amp;amp; encodings.Find(&amp;quot;gzip&amp;quot;).IsEmpty)

            preferred = new QValue(&amp;quot;gzip&amp;quot;);

        HttpResponseBase response = filterContext.HttpContext.Response;
        // handle the preferred encoding
        switch (preferred.Name)
        {
            case &amp;quot;gzip&amp;quot;:
                response.AppendHeader(&amp;quot;Content-encoding&amp;quot;, &amp;quot;gzip&amp;quot;);
                response.Filter = new GZipStream(response.Filter, CompressionMode.Compress);
                break;

            case &amp;quot;deflate&amp;quot;:
                response.AppendHeader(&amp;quot;Content-encoding&amp;quot;, &amp;quot;deflate&amp;quot;);
                response.Filter = new DeflateStream(response.Filter, CompressionMode.Compress);
                break;

            case &amp;quot;identity&amp;quot;:
                break;
            default:
                break;
        }
    }
}&lt;/pre&gt;

&lt;p&gt;Which when applied as below to any action method will enable compression if it’s supported by the browser.&lt;/p&gt;

&lt;pre class="brush: csharp; auto-links: false;"&gt;[AcceptVerbs(HttpVerbs.Get)]
[CompressFilter]
public ContentResult SiteMap()
{
    return new ContentResult
               {
                   Content = SyndicationHelper.GetAggregateSiteMap(),
                   ContentType = &amp;quot;application/xml; charset=UTF-8&amp;quot;
               };
}&lt;/pre&gt;

&lt;p&gt;Download here: &lt;a href="http://www.58bits.com/download/QValueAndCompressionFilter.zip"&gt;QValueAndCompressionFilter.zip&lt;/a&gt;&lt;/p&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=4433c8d8-0955-4c91-b2dc-c31af644ea4c"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,4433c8d8-0955-4c91-b2dc-c31af644ea4c.aspx</comments>
      <category>ASP.Net</category>
      <category>C#</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=c153d8ab-fd41-4a06-86e2-6d6b38f01a6b</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,c153d8ab-fd41-4a06-86e2-6d6b38f01a6b.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,c153d8ab-fd41-4a06-86e2-6d6b38f01a6b.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=c153d8ab-fd41-4a06-86e2-6d6b38f01a6b</wfw:commentRss>
      <title>Why is Google Fuzz Testing My Site</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,c153d8ab-fd41-4a06-86e2-6d6b38f01a6b.aspx</guid>
      <link>http://www.58bits.com/blog/2009/04/10/Why-Is-Google-Fuzz-Testing-My-Site.aspx</link>
      <pubDate>Fri, 10 Apr 2009 17:36:49 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;This is weird – was looking at some of the reports in the &lt;a href="http://www.google.com/webmasters/tools" target="_blank"&gt;Webmaster Tools&lt;/a&gt; I use from Google – and there were a &lt;strong&gt;lot&lt;/strong&gt; (several hundred) Web crawl 404 not founds. Google reports that its spider was failing to find pages that I’ve never published – and which contain values that are incrementing over a range as parameter inputs in the url – 692-708 in the snapshot below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/WhyisGoogleFuzzTestingMySite_87C/report_01_2_4.jpg"&gt;&lt;img title="report_01_2" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="206" alt="report_01_2" src="http://www.58bits.com/blog/content/binary/WindowsLiveWriter/WhyisGoogleFuzzTestingMySite_87C/report_01_2_thumb_1.jpg" width="546" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=c153d8ab-fd41-4a06-86e2-6d6b38f01a6b"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,c153d8ab-fd41-4a06-86e2-6d6b38f01a6b.aspx</comments>
      <category>Other Tech</category>
      <category>Security</category>
    </item>
    <item>
      <trackback:ping>http://www.58bits.com/blog/Trackback.aspx?guid=f6772066-3e23-4f60-be0a-f02198761312</trackback:ping>
      <pingback:server>http://www.58bits.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.58bits.com/blog/PermaLink,guid,f6772066-3e23-4f60-be0a-f02198761312.aspx</pingback:target>
      <dc:creator>Anthony Bouch</dc:creator>
      <wfw:comment>http://www.58bits.com/blog/CommentView,guid,f6772066-3e23-4f60-be0a-f02198761312.aspx</wfw:comment>
      <wfw:commentRss>http://www.58bits.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f6772066-3e23-4f60-be0a-f02198761312</wfw:commentRss>
      <title>Best ASP.Net Web Hosting</title>
      <guid isPermaLink="false">http://www.58bits.com/blog/PermaLink,guid,f6772066-3e23-4f60-be0a-f02198761312.aspx</guid>
      <link>http://www.58bits.com/blog/2009/04/08/Best-ASPNet-Web-Hosting.aspx</link>
      <pubDate>Wed, 08 Apr 2009 13:09:20 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;&lt;a href="http://www.opte.org/maps/" target="_blank"&gt;&lt;img style="border-right-width: 0px; margin: 5px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="imap" border="0" alt="imap" align="left" src="content/binary/WindowsLiveWriter/BestASPNetWebHosting_11140/imap_3.jpg" width="244" height="242" /&gt;&lt;/a&gt; Trying to find a good ASP.Net web hosting company that represents the balance I need between cost and features turned out to be harder than I thought.&lt;/p&gt;  &lt;p&gt;I recently signed up with &lt;a href="http://www.discountasp.net/" target="_blank"&gt;Discount ASP.Net&lt;/a&gt; – and you know what – for just ten dollars a month – they offer excellent value for money, great support, a good in-house control panel and good bandwidth. They’ve kept their setup very simple and standard – with just one type of account (Computer security design principle number three – &lt;strong&gt;assurance&lt;/strong&gt; vs. &lt;strong&gt;complexity&lt;/strong&gt;). &lt;/p&gt;  &lt;p&gt;On a single account, you have one root site – one domain and as many additional domains pointing to that ‘same’ root content as you like. You cannot point domain names to subdirectories – so you’ll need to re-write yourself if you want another domain name pointing to different content. &lt;/p&gt;  &lt;p&gt;But then I discovered their ‘standard’ application pool recycle settings, which are: 1) You are idle for twenty minutes, 2) the worker process exceeds a 200MB working set, or 3) CPU utilization exceeds 70% for more than 3 minutes. To be honest these are all more than adequate for a single site, blog, or the standard five page company website. But &lt;a href="http://www.dasblog.info/" target="_blank"&gt;dasBlog&lt;/a&gt; is a little memory hungry, and with two blogs and a photo gallery – my app pool was doing flip-flops &lt;strong&gt;&lt;em&gt;many&lt;/em&gt;&lt;/strong&gt; times a day.&lt;/p&gt;  &lt;p&gt;So I searched and searched – and was generally unimpressed with the list of hosting companies ranked by some of the reviews. Sites were either unprofessional – or there was enough mixed reviews to put me off. Others were just too vague about what was in the package and others were not on W2K8/IIS7 yet (and I need IIS7).&lt;/p&gt;  &lt;p&gt;So it came down to &lt;a href="http://www.orcsweb.com/" target="_blank"&gt;ORCS Web Hosting&lt;/a&gt; who are in a &lt;a href="http://www.peak10.com/" target="_blank"&gt;Peak 10 data centre&lt;/a&gt; – and &lt;a href="http://www.serverintellect.com/" target="_blank"&gt;Server Intellect&lt;/a&gt; – who are in a data centre located in the the Infomart Hotel in Dallas – now a part of &lt;a href="http://www.dcitechholdings.com/html/dci_portfolio.html" target="_blank"&gt;DCI Technology Holdings&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Server Intellect truly impressed me with their pre-sales support and they were super keen to get the business (even if it was just me). And their Tier 2 plan allows for multiple wwwroot directories and domain names – which is sweet. However not yet having a shared plan on W2K8/IIS7, combined with a personal recommendation for ORCS Web Hosting from &lt;a href="http://www.hanselman.com/blog/" target="_blank"&gt;this guy&lt;/a&gt;, swung me towards ORCS Web.&lt;/p&gt;  &lt;p&gt;ORCS Web &lt;a href="http://www.orcsweb.com/hosting/shared.aspx" target="_blank"&gt;Platinum Shared Hosting&lt;/a&gt; is not that different from the Discount ASP.Net setup in so far as you get a single root site and unlimited additional domain and mail aliases, but that’s where the similarities end. The app pool has no idle time limit, no CPU limit, and an 800MB working set threshold. Data transfer allowance is 100 GB/month – and the site is in a data centre with fat pipes from…&lt;/p&gt;  &lt;blockquote&gt;...multiple Tier-1 Internet carriers with multiple fully-lit OCx connections. &lt;/blockquote&gt;  &lt;p&gt;…served in part by &lt;a href="http://www.level3.com/" target="_blank"&gt;Level 3 Communications&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;So that’s where I am now… although – it was a bumpy start. ORCS appear to have built, or had built, a new control panel which was err… buggy. Support was fine though and we got the wrinkles ironed out. &lt;/p&gt;  &lt;p&gt;So ORCS Web hosting is my new home in cyberspace for the moment; nice view, plenty of room, and fast&amp;#160; - will be here until the &lt;a href="http://en.wikipedia.org/wiki/Cloud_computing" target="_blank"&gt;&lt;strong&gt;&lt;em&gt;clouds&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; come along :-)&lt;/p&gt;&lt;img width="0" height="0" src="http://www.58bits.com/blog/aggbug.ashx?id=f6772066-3e23-4f60-be0a-f02198761312"/&gt;&lt;/div&gt;</description>
      <comments>http://www.58bits.com/blog/CommentView,guid,f6772066-3e23-4f60-be0a-f02198761312.aspx</comments>
      <category>ASP.Net</category>
      <category>Other Tech</category>
    </item>
  </channel>
</rss>