<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Rick Strahl's Web Log</title>
    <link>http://www.west-wind.com/weblog/</link>
    <description>Life, Surf, Code and everything in between</description>
    <generator>West Wind Web Log</generator>
    <language>en-us</language>
    <image>
      <url>http://www.west-wind.com/weblog/images/WebLogBannerLogo.jpg</url>
      <title>Rick Strahl's Web Log</title>
      <link>http://www.west-wind.com/weblog/</link>
    </image>
    <pubDate>Sat, 18 May 2013 21:49:50 GMT</pubDate>
    <lastBuildDate>Fri, 10 May 2013 09:29:26 GMT</lastBuildDate>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/RickStrahl" /><feedburner:info uri="rickstrahl" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>20.906999</geo:lat><geo:long>-156.382029</geo:long><creativeCommons:license>http://creativecommons.org/licenses/by/2.0/</creativeCommons:license><xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /><meta xmlns="http://pipes.yahoo.com" name="pipes" content="noprocess" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FRickStrahl" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FRickStrahl" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FRickStrahl" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FRickStrahl" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FRickStrahl" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><item>
      <title>Publish Individual Files to your Server in Visual Studio 2012.2</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/5IC5_e8oUDY/Publish-Individual-Files-to-your-Server-in-Visual-Studio-20122</link>
      <guid isPermaLink="false">124546_201305100929</guid>
      <pubDate>Fri, 10 May 2013 09:29:26 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2013/May/10/Publish-Individual-Files-to-your-Server-in-Visual-Studio-20122#Comments</comments>
      <slash:comments>7</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=124546</wfw:commentRss>
      <category>ASP.NET</category>
      <category>Visual Studio</category>
      <description>&lt;p&gt;In Visual Studio 2012 Update 2 there's a sweet little new gem, that I championed for some time in the past, and that has finally made it into the VS box: You can now publish individual files to the server without having to publish the entire site. You can now publish 1 or more files simply by selecting them in the Solution Explorer and using the Context Menu's Publish Selected Files or Publish File xxxx.xxx. &lt;/p&gt; &lt;p&gt;&lt;a href="http://www.west-wind.com/Weblog/images/2013Windows-Live-Writer/Publish-Individual-Files-to-your-Server_14316/PublishIndividualFile_4.png"&gt;&lt;img title="PublishIndividualFile" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="PublishIndividualFile" src="http://www.west-wind.com/Weblog/images/2013Windows-Live-Writer/Publish-Individual-Files-to-your-Server_14316/PublishIndividualFile_thumb_1.png" width="565" height="594"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;In the past if you wanted to publish your site, it was an all or nothing affair: You basically had to rebuild and re-publish the entire site. Publishing works great when you're making major updates that affect binaries and configuration settings. In that case you do want a full publish to push up your binary file changes as well as web.config transformations etc. This is a great feature and the cornerstone of publishing which is as it should be.&lt;/p&gt; &lt;p&gt;But on more than a few occasions I've:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Forgotten to include some content file like an image in a full publish  &lt;li&gt;Had to make a really minor change to a content file or image and need to push it up  &lt;li&gt;Make some quick iterative changes repeatedly to a file to tweak the UI or an image on the server&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Now, with Update 2 you have another option to publishing the entire site -you can now publish an individual file.&lt;/p&gt; &lt;p&gt;I know this is a minor thing, but I can't tell you how often I use this for quick image or CSS updates. Sometimes I actually prefer making changes to these sorts of things on a live site rather than firing up the local copy first especially if the live site is running with a full set of data. It's often convenient to just push individual files. This is especially true for my personal content sites, more so than typical business applications.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h3&gt;Web Deploy Getting Easier&lt;/h3&gt; &lt;p&gt;As a side note I've been a big fan of Web Deployment in Visual Studio - it's such a tremendous time saver over manually uploading files to the server and trying to figure out what needs updating. Prior to Web Deploy features in Visual Studio I actually had used a custom solution I cobbled together using FTP that provided much of the same functinality including the abililty to push individual files which I found very useful.&lt;/p&gt; &lt;p&gt;It's also great in a team environment, since publish settings are typically shared in source control. This ensures that everybody is pushing up code consistently to the staging or live server using the same settings that are configured only once. It's great when a new developer comes on board especially - they don't have to configure anything they are just ready to go.&lt;/p&gt; &lt;p&gt;When Web Publishing was introduced the intial versions were horrible to the point of unusability. In VS 2010 it improved somewhat, but the server side installation of Web Deploy was still a major pain in the ass. Getting Web Deploy configured properly on the server has been a real pain in the ass with 3 different installs required and several manual configuration steps.&lt;/p&gt; &lt;p&gt;With the latest Web Deploy 3.0 release though, Microsoft finally seems to have gotten Web Deploy right to where it's a single simple installation on the server that just works once installed. There no longer are any finicky configuration settings and it just works off the single install. Inside of the Visual Studio 2012 Web Publish client also has made the Publish Settings dialog a bit more user friendly and more flexible in what you can use to connect to the server. VS now understands pure site urls and virtuals as opposed to the base site url and Site ID/Name that was required previously and was always confusing. &lt;/p&gt; &lt;p&gt;&lt;a href="http://www.west-wind.com/Weblog/images/2013Windows-Live-Writer/Publish-Individual-Files-to-your-Server_14316/WebPublishSettingsDialog_2.png"&gt;&lt;img title="WebPublishSettingsDialog" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="WebPublishSettingsDialog" src="http://www.west-wind.com/Weblog/images/2013Windows-Live-Writer/Publish-Individual-Files-to-your-Server_14316/WebPublishSettingsDialog_thumb.png" width="720" height="565"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;The end effect is I no longer dread setting up Web Deploy for the first time on a server, nor do I have to go look up the configuration for another site to figure out what put in the boxes :-).&lt;/p&gt; &lt;p&gt;It's kind of sad that it took so long for Web Deploy to get it all right, but now the whole thing is ridiculously smooth. There are a still a few issues with web.config transforms that are difficult to deal with from time to time, but that's not really Web Deploy's problem, but a problem of how to partition developer specific settings in configuration files which is always a problem.&lt;/p&gt; &lt;p&gt;In any case, I hope some of you find the new single file or selected file publishing feature as useful as I have. It's just one more little tweak that makes life easier and shaves a few minutes off the development process. Score!&lt;/p&gt;&lt;div style='margin: 10px 0px'&gt;&lt;small&gt;© Rick Strahl, West Wind Technologies, 2005-2013&lt;/small&gt;&lt;/div&gt;&lt;div&gt;Posted in &lt;b&gt;&lt;a href='/Weblog/ShowPosts.aspx?Category=ASP.NET'&gt;ASP.NET&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href='/Weblog/ShowPosts.aspx?Category=Visual Studio'&gt;Visual Studio&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div style='margin-top: 5px;'&gt;
&lt;a href="https://twitter.com/share" class="twitter-share-button" data-text="Publish Individual Files to your Server in Visual Studio 2012.2" data-via="RickStrahl" data-lang="en" data-hashtags="" data-url="http://www.west-wind.com/weblog/posts/2013/May/10/Publish-Individual-Files-to-your-Server-in-Visual-Studio-20122"&gt;Tweet&lt;/a&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");&lt;/script&gt;

&lt;g:plusone size="medium" href="http://www.west-wind.com/weblog/posts/2013/May/10/Publish-Individual-Files-to-your-Server-in-Visual-Studio-20122" "&gt;&lt;/g:plusone&gt;
&lt;script type="text/javascript"&gt;
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;/div&gt;&lt;/small&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=5IC5_e8oUDY:aDkMMbMLmeI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=5IC5_e8oUDY:aDkMMbMLmeI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=5IC5_e8oUDY:aDkMMbMLmeI:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=5IC5_e8oUDY:aDkMMbMLmeI:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=5IC5_e8oUDY:aDkMMbMLmeI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=5IC5_e8oUDY:aDkMMbMLmeI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=5IC5_e8oUDY:aDkMMbMLmeI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=5IC5_e8oUDY:aDkMMbMLmeI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=5IC5_e8oUDY:aDkMMbMLmeI:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/5IC5_e8oUDY" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2013/May/10/Publish-Individual-Files-to-your-Server-in-Visual-Studio-20122</feedburner:origLink></item>
    <item>
      <title>A WebAPI Basic Authentication MessageHandler</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/tLyuolUcxag/A-WebAPI-Basic-Authentication-MessageHandler</link>
      <guid isPermaLink="false">114978_201304301029</guid>
      <pubDate>Tue, 30 Apr 2013 10:29:42 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2013/Apr/30/A-WebAPI-Basic-Authentication-MessageHandler#Comments</comments>
      <slash:comments>4</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=114978</wfw:commentRss>
      <category>Web Api</category>
      <description>&lt;p&gt;&lt;a href="http://www.west-wind.com/weblog/posts/2013/Apr/18/A-WebAPI-Basic-Authentication-Authorization-Filter" target="_blank"&gt;In my last post I showed a very simple Basic Authentication Filter implementation&lt;/a&gt; and several people commented that the 'right' way to do this is by using a MessageHandler instead. In the post I discussed why I opted for a filter rather than the MessageHandler: A filter is much simpler to implement and keeps all the relevant code pieces in one place instead of scattering them throughout the Web API pipeline. This might not be the right choice for all authentication, but if you're doing custom authentication/authorization in your app you're not going to mix and match and plug a multitude of auth mechanisms together. For simple auth scenarios a filter is just fine, especially since even when you implement a MessageHandler you need to implement an AuthorizationFilter anyway.&lt;/p&gt; &lt;p&gt;Just as an exercise, I spend a little time today to put together a message handler based Basic Authentication implementation to contrast the two. There are a few more moving pieces to this implementation:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;A MessageHandler to handle the Basic Auth processing  &lt;li&gt;A custom Identity to pass the username and password around  &lt;li&gt;An Authorization filter to validate the user&lt;/li&gt;&lt;/ul&gt; &lt;h3&gt;MessageHandler for Authentication&lt;/h3&gt; &lt;p&gt;MessageHandlers in Web API are chainable components that hook into the request/response pipeline. You can plug many message handlers together to provide many module like features. MessageHandlers can handle processing on the inbound request cycle and the output response cycle, via a simple Task&amp;lt;T&amp;gt; abstraction that provides the asynchronous pipeline processing.&lt;/p&gt; &lt;p&gt;To implement the BasicAuthenticationHandler you can create a class derived from DelegatingHandler and override the SendAsync method:&lt;/p&gt; &lt;pre class="code"&gt;&lt;span style=" color: blue"&gt;public class &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;BasicAuthenticationHandler &lt;/span&gt;&lt;span style=" color: black"&gt;: &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;DelegatingHandler
&lt;/span&gt;&lt;span style=" color: black"&gt;{
    &lt;/span&gt;&lt;span style=" color: blue"&gt;private const string &lt;/span&gt;&lt;span style=" color: black"&gt;WWWAuthenticateHeader = &lt;/span&gt;&lt;span style=" color: #a31515"&gt;"WWW-Authenticate"&lt;/span&gt;&lt;span style=" color: black"&gt;;

    &lt;/span&gt;&lt;span style=" color: blue"&gt;protected override &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;Task&lt;/span&gt;&lt;span style=" color: black"&gt;&amp;lt;&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;HttpResponseMessage&lt;/span&gt;&lt;span style=" color: black"&gt;&amp;gt; SendAsync(&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;HttpRequestMessage &lt;/span&gt;&lt;span style=" color: black"&gt;request, 
                                                           &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;CancellationToken &lt;/span&gt;&lt;span style=" color: black"&gt;cancellationToken)
    {
        &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;credentials = ParseAuthorizationHeader(request);

        &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(credentials != &lt;/span&gt;&lt;span style=" color: blue"&gt;null&lt;/span&gt;&lt;span style=" color: black"&gt;)
        {
            &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;identity = &lt;/span&gt;&lt;span style=" color: blue"&gt;new &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;BasicAuthenticationIdentity&lt;/span&gt;&lt;span style=" color: black"&gt;(credentials.Name, credentials.Password);
            &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;principal = &lt;/span&gt;&lt;span style=" color: blue"&gt;new &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;GenericPrincipal&lt;/span&gt;&lt;span style=" color: black"&gt;(identity, &lt;/span&gt;&lt;span style=" color: blue"&gt;null&lt;/span&gt;&lt;span style=" color: black"&gt;);

            &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;Thread&lt;/span&gt;&lt;span style=" color: black"&gt;.CurrentPrincipal = principal;
            &lt;/span&gt;&lt;span style=" color: green"&gt;//if (HttpContext.Current != null)
            //    HttpContext.Current.User = principal;
        &lt;/span&gt;&lt;span style=" color: black"&gt;}

        &lt;/span&gt;&lt;span style=" color: blue"&gt;return base&lt;/span&gt;&lt;span style=" color: black"&gt;.SendAsync(request, cancellationToken)
            .ContinueWith(task =&amp;gt;
            {
                &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;response = task.Result;
                &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(credentials == &lt;/span&gt;&lt;span style=" color: blue"&gt;null &lt;/span&gt;&lt;span style=" color: black"&gt;&amp;amp;&amp;amp; response.StatusCode == &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;HttpStatusCode&lt;/span&gt;&lt;span style=" color: black"&gt;.Unauthorized)
                    Challenge(request, response);


                &lt;/span&gt;&lt;span style=" color: blue"&gt;return &lt;/span&gt;&lt;span style=" color: black"&gt;response;
            });
    }

    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style=" color: green"&gt;Parses the Authorization header and creates user credentials
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name="actionContext"&amp;gt;&amp;lt;/param&amp;gt;
    &lt;/span&gt;&lt;span style=" color: blue"&gt;protected virtual &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;BasicAuthenticationIdentity &lt;/span&gt;&lt;span style=" color: black"&gt;ParseAuthorizationHeader(&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;HttpRequestMessage &lt;/span&gt;&lt;span style=" color: black"&gt;request)
    {
        &lt;/span&gt;&lt;span style=" color: blue"&gt;string &lt;/span&gt;&lt;span style=" color: black"&gt;authHeader = &lt;/span&gt;&lt;span style=" color: blue"&gt;null&lt;/span&gt;&lt;span style=" color: black"&gt;;
        &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;auth = request.Headers.Authorization;
        &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(auth != &lt;/span&gt;&lt;span style=" color: blue"&gt;null &lt;/span&gt;&lt;span style=" color: black"&gt;&amp;amp;&amp;amp; auth.Scheme == &lt;/span&gt;&lt;span style=" color: #a31515"&gt;"Basic"&lt;/span&gt;&lt;span style=" color: black"&gt;)
            authHeader = auth.Parameter;

        &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(&lt;/span&gt;&lt;span style=" color: blue"&gt;string&lt;/span&gt;&lt;span style=" color: black"&gt;.IsNullOrEmpty(authHeader))
            &lt;/span&gt;&lt;span style=" color: blue"&gt;return null&lt;/span&gt;&lt;span style=" color: black"&gt;;

        authHeader = &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;Encoding&lt;/span&gt;&lt;span style=" color: black"&gt;.Default.GetString(&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;Convert&lt;/span&gt;&lt;span style=" color: black"&gt;.FromBase64String(authHeader));

        &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;tokens = authHeader.Split(&lt;/span&gt;&lt;span style=" color: #a31515"&gt;':'&lt;/span&gt;&lt;span style=" color: black"&gt;);
        &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(tokens.Length &amp;lt; 2)
            &lt;/span&gt;&lt;span style=" color: blue"&gt;return null&lt;/span&gt;&lt;span style=" color: black"&gt;;

        &lt;/span&gt;&lt;span style=" color: blue"&gt;return new &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;BasicAuthenticationIdentity&lt;/span&gt;&lt;span style=" color: black"&gt;(tokens[0], tokens[1]);
    }


    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style=" color: green"&gt;Send the Authentication Challenge request
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name="message"&amp;gt;&amp;lt;/param&amp;gt;
    /// &amp;lt;param name="actionContext"&amp;gt;&amp;lt;/param&amp;gt;
    &lt;/span&gt;&lt;span style=" color: blue"&gt;void &lt;/span&gt;&lt;span style=" color: black"&gt;Challenge(&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;HttpRequestMessage &lt;/span&gt;&lt;span style=" color: black"&gt;request, &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;HttpResponseMessage &lt;/span&gt;&lt;span style=" color: black"&gt;response)
    {
        &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;host = request.RequestUri.DnsSafeHost;                    
        response.Headers.Add(WWWAuthenticateHeader, &lt;/span&gt;&lt;span style=" color: blue"&gt;string&lt;/span&gt;&lt;span style=" color: black"&gt;.Format(&lt;/span&gt;&lt;span style=" color: #a31515"&gt;"Basic realm=\"{0}\""&lt;/span&gt;&lt;span style=" color: black"&gt;, host));
    }

}&lt;/span&gt;&lt;/pre&gt;If you looked at my last post this should look fairly familiar - the basic auth logic is very similar to the filter. I reused the Challenge and ParseAuthorizationHeader changing just the inputs to the request and response messages respectively.

&lt;p&gt;The message handler works in two distinct steps - the initial code that fires on the inbound request, which tries to parse the authentication header into a BasicAuthenticationIdentity and assigning that identity to the thread principle.&lt;/p&gt;
&lt;p&gt;The second step - the part in the ContinueWith() Task block - handles the processing on the outbound response. Things have to be broken up like this in a MessageHandler because the Response doesn't exist on the inbound request yet. The code here is responsible for issuing the challenge if the response status is unauthorized. &lt;/p&gt;
&lt;p&gt;So the logic goes like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Request is authenticated already - goes through 
&lt;li&gt;Request is not authenticated and returns a 401 (from an AuthFilter or explicit 401 ResponseMessage from code) 
&lt;li&gt;Request is not authenticated and returns something other 401 - request goes through&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;To make all this work there are a couple more things that need to be implemented.&lt;/p&gt;
&lt;h3&gt;BasicAuthenticationIdentity&lt;/h3&gt;
&lt;p&gt;Basic Authentication works via a username and password that is passed as a base64 encoded, clear text string. In order to authorize the user in a custom authorization scenario that username and password has to be passed up the pipeline into the AuthorizationFilter that actually handles the authorization of the user.&lt;/p&gt;
&lt;p&gt;To do this I opted to create a BasicAuthenticationIdentity class. Using this identity the handler can set the username and password on the Identity and pass it to AuthorizeFilter. Here's the implementation:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;summary&amp;gt;
/// &lt;/span&gt;&lt;span style=" color: green"&gt;Custom Identity that adds a password captured by basic authentication
&lt;/span&gt;&lt;span style=" color: gray"&gt;/// &lt;/span&gt;&lt;span style=" color: green"&gt;to allow for an auth filter to do custom authorization
&lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;/summary&amp;gt;
&lt;/span&gt;&lt;span style=" color: blue"&gt;public class &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;BasicAuthenticationIdentity &lt;/span&gt;&lt;span style=" color: black"&gt;: &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;GenericIdentity
&lt;/span&gt;&lt;span style=" color: black"&gt;{
    &lt;/span&gt;&lt;span style=" color: blue"&gt;public &lt;/span&gt;&lt;span style=" color: black"&gt;BasicAuthenticationIdentity(&lt;/span&gt;&lt;span style=" color: blue"&gt;string &lt;/span&gt;&lt;span style=" color: black"&gt;name, &lt;/span&gt;&lt;span style=" color: blue"&gt;string &lt;/span&gt;&lt;span style=" color: black"&gt;password) : &lt;/span&gt;&lt;span style=" color: blue"&gt;base&lt;/span&gt;&lt;span style=" color: black"&gt;(name,"Basic")
    {            
        &lt;/span&gt;&lt;span style=" color: blue"&gt;this&lt;/span&gt;&lt;span style=" color: black"&gt;.Password = password;
    }

    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style=" color: green"&gt;Basic Auth Password for custom authentication
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;/summary&amp;gt;
    &lt;/span&gt;&lt;span style=" color: blue"&gt;public string &lt;/span&gt;&lt;span style=" color: black"&gt;Password { &lt;/span&gt;&lt;span style=" color: blue"&gt;get&lt;/span&gt;&lt;span style=" color: black"&gt;; &lt;/span&gt;&lt;span style=" color: blue"&gt;set&lt;/span&gt;&lt;span style=" color: black"&gt;; }               
}&lt;/span&gt;&lt;/pre&gt;
&lt;h3&gt;AuthorizeFilter&lt;/h3&gt;
&lt;p&gt;Next we need a filter to handle the authorization of the user. This logic most likely will be application specific. Because all we'll need to do here is validate the user's credentials and return yay or nay, an AuthorizeFilter is the easiest:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style=" color: blue"&gt;public class &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;MyAuthorizationFilter &lt;/span&gt;&lt;span style=" color: black"&gt;: &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;AuthorizeAttribute
&lt;/span&gt;&lt;span style=" color: black"&gt;{&lt;/span&gt;&lt;span style=" color: black"&gt;      
    &lt;/span&gt;&lt;span style=" color: blue"&gt;protected override bool &lt;/span&gt;&lt;span style=" color: black"&gt;IsAuthorized(&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;HttpActionContext &lt;/span&gt;&lt;span style=" color: black"&gt;actionContext)
    {             
        &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;identity = &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;Thread&lt;/span&gt;&lt;span style=" color: black"&gt;.CurrentPrincipal.Identity;
        &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(identity == &lt;/span&gt;&lt;span style=" color: blue"&gt;null &lt;/span&gt;&lt;span style=" color: black"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;HttpContext&lt;/span&gt;&lt;span style=" color: black"&gt;.Current != &lt;/span&gt;&lt;span style=" color: blue"&gt;null&lt;/span&gt;&lt;span style=" color: black"&gt;)
            identity = &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;HttpContext&lt;/span&gt;&lt;span style=" color: black"&gt;.Current.User.Identity;

        &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(identity != &lt;/span&gt;&lt;span style=" color: blue"&gt;null &lt;/span&gt;&lt;span style=" color: black"&gt;&amp;amp;&amp;amp; identity.IsAuthenticated)
        {
            &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;basicAuth = identity &lt;/span&gt;&lt;span style=" color: blue"&gt;as &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;BasicAuthenticationIdentity&lt;/span&gt;&lt;span style=" color: black"&gt;;

            &lt;/span&gt;&lt;span style=" color: green"&gt;// do your business validation as needed
            &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;user = &lt;/span&gt;&lt;span style=" color: blue"&gt;new &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;BusUser&lt;/span&gt;&lt;span style=" color: black"&gt;();
            &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(user.Authenticate(basicAuth.Name, basicAuth.Password))
                &lt;/span&gt;&lt;span style=" color: blue"&gt;return true&lt;/span&gt;&lt;span style=" color: black"&gt;;                
        }

        &lt;/span&gt;&lt;span style=" color: blue"&gt;return false&lt;/span&gt;&lt;span style=" color: black"&gt;;
    }
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;In the filter you can simply override the IsAuthorized() method and return true or false. If you return false WebAPI automatically fires a 401 status code, which triggers the Challenge() in the BasicAuthenticationHandler that's monitoring for 401's.&lt;/p&gt;
&lt;p&gt;The IsAuthorized method implementation typically has business specific code in it that handles the authorization of the user. Basically you can capture the Thread Principal and the BasicAuthenticationIdentity and retrieve the username and password. You can then go to town on the username and password. In my example here a business object is fired up to authenticate the user.&lt;/p&gt;
&lt;p&gt;By the way, notice that in my last post I used an &lt;em&gt;AuthorizationFilter&lt;/em&gt; - and here I'm using an &lt;em&gt;AuthorizeFilter. &lt;/em&gt;AuthorizeFilter works great if all you need to do is validate a user and return true or false. If there's more logic involved that, like creating a new response then an AuthorizationFilter is the better choice. &lt;/p&gt;
&lt;h3&gt;Configuration&lt;/h3&gt;
&lt;p&gt;Once the handler and filter exist they have to be hooked up. MessageHandlers have to be added in the configuration:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style=" color: #2b91af"&gt;GlobalConfiguration&lt;/span&gt;&lt;span style=" color: black"&gt;.Configuration.MessageHandlers.Add(&lt;/span&gt;&lt;span style=" color: blue"&gt;new &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;BasicAuthenticationHandler&lt;/span&gt;&lt;span style=" color: black"&gt;());&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;The AuthorizationFilter can either be applied via global configuration or on the controller:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style=" color: #2b91af"&gt;GlobalConfiguration&lt;/span&gt;&lt;span style=" color: black"&gt;.Configuration.Filters.Add(&lt;/span&gt;&lt;span style=" color: blue"&gt;new &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;MyAuthorizationFilter&lt;/span&gt;&lt;span style=" color: black"&gt;());       &lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;or you can apply it on the controller:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style=" color: black"&gt;[&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;MyAuthorizationFilter&lt;/span&gt;&lt;span style=" color: black"&gt;]
&lt;/span&gt;&lt;span style=" color: blue"&gt;public class &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;QueueController &lt;/span&gt;&lt;span style=" color: black"&gt;: &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;ApiController&lt;/span&gt;&lt;/pre&gt;
&lt;h3&gt;Filter or MessageHandler - you decide&lt;/h3&gt;
&lt;p&gt;Comparing the two modes of operation - Authentication MessageHandler or AuthorizationFilter - there's not a tremendous difference in implementation. To me the filter is more compact and easier to follow what's going on simply because everything is in one place. For most typical custom login scenarios that are tied to business logic, that'll be totally sufficient. The advantage of a message handler is that it's globally applied and is part of the WebAPI pipeline so if several components need to take advantage of BasicAuthentication with different Authorization that would work. But then again you can do that with a filter as well, especially since a MessageHandler still requires a filter for it's authorization. &amp;lt;shrug&amp;gt;&lt;/p&gt;
&lt;p&gt;Either way you can take your pick from these two implementations.&lt;/p&gt;
&lt;h3&gt;Resources&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://github.com/RickStrahl/WestwindToolkit/blob/master/Westwind.Web.WebApi/Handlers/BasicAuthenticationHandler.cs" target="_blank"&gt;BasicAuthenticationHandler Code on GitHub&lt;/a&gt;&lt;/strong&gt; 
&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.west-wind.com/weblog/posts/2013/Apr/18/A-WebAPI-Basic-Authentication-Authorization-Filter" target="_blank"&gt;Basic Authentication Authorization Filter Post&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style='margin: 10px 0px'&gt;&lt;small&gt;© Rick Strahl, West Wind Technologies, 2005-2013&lt;/small&gt;&lt;/div&gt;&lt;div&gt;Posted in &lt;b&gt;&lt;a href='/Weblog/ShowPosts.aspx?Category=Web Api'&gt;Web Api&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div style='margin-top: 5px;'&gt;
&lt;a href="https://twitter.com/share" class="twitter-share-button" data-text="A WebAPI Basic Authentication MessageHandler" data-via="RickStrahl" data-lang="en" data-hashtags="" data-url="http://www.west-wind.com/weblog/posts/2013/Apr/30/A-WebAPI-Basic-Authentication-MessageHandler"&gt;Tweet&lt;/a&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");&lt;/script&gt;

&lt;g:plusone size="medium" href="http://www.west-wind.com/weblog/posts/2013/Apr/30/A-WebAPI-Basic-Authentication-MessageHandler" "&gt;&lt;/g:plusone&gt;
&lt;script type="text/javascript"&gt;
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;/div&gt;&lt;/small&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=tLyuolUcxag:KRYEY0AgOhE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=tLyuolUcxag:KRYEY0AgOhE:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=tLyuolUcxag:KRYEY0AgOhE:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=tLyuolUcxag:KRYEY0AgOhE:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=tLyuolUcxag:KRYEY0AgOhE:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=tLyuolUcxag:KRYEY0AgOhE:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=tLyuolUcxag:KRYEY0AgOhE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=tLyuolUcxag:KRYEY0AgOhE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=tLyuolUcxag:KRYEY0AgOhE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/tLyuolUcxag" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2013/Apr/30/A-WebAPI-Basic-Authentication-MessageHandler</feedburner:origLink></item>
    <item>
      <title>A WebAPI Basic Authentication Authorization Filter</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/u5GfOCYG_K8/A-WebAPI-Basic-Authentication-Authorization-Filter</link>
      <guid isPermaLink="false">104409_201304181835</guid>
      <pubDate>Thu, 18 Apr 2013 18:35:19 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2013/Apr/18/A-WebAPI-Basic-Authentication-Authorization-Filter#Comments</comments>
      <slash:comments>9</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=104409</wfw:commentRss>
      <category>Web Api</category>
      <category>Security</category>
      <description>&lt;p&gt;ASP.NET Web API allows for a number of different ways to implement security. The 'accepted' way to handle authentication is to use either IIS's built in security (ie. rely on HttpContext and the IIS authentication through Windows Security) or you can roll your own inside of Web API using Web APIs message semantics. If you roll your own the recommended way for authentication is to create a MessageHandler and then add Authorization with a Filter. AFAIK, Web API natively doesn't ship with any authentication handlers at all, so you pretty much have to roll your own if you want to host outside of IIS. &lt;/p&gt; &lt;p&gt;Anyway, in one of my apps for a customer we needed custom user authentication based on user credentials from the business layer and the client explicitly requested Basic authentication due to the client side requirements. Basic Authentication is easy and support by just about any Web client, but it's not secure and requires that SSL is used to keep the encoded (not encrypted) credentials somewhat safe from simple attacks. In this case the app runs on an internal network so the risk factor is low. &lt;/p&gt; &lt;h3&gt;Filter Only?&lt;/h3&gt; &lt;p&gt;When I looked at the various options at implementing custom login security outside of ASP.NET, the first thing I found was Authorization filters. Authorization filters are a really easy way to examine the request, determine whether a user has access and then either going on or exiting out with an UnauthorizedAccess exception. &lt;/p&gt; &lt;p&gt;Filters aren't meant to be full on HTTP request managers that return results - typically that's meant for MessageHandlers in Web API - but Basic Authentication is such a simple protocol that requires just a few lines of code to implement, so I went ahead and implemented the entire protocol in the filter. Since in this application we have a specific way of authorizing there's only one type of auth happening, there was little need to use a more complex implementation. For contrast in my next post &lt;a href="http://www.west-wind.com/weblog/posts/2013/Apr/30/A-WebAPI-Basic-Authentication-MessageHandler" target="_blank"&gt;I also implement a message handler based Basic Authentication implementation&lt;/a&gt;, so you can easily compare the two if wish.&lt;/p&gt; &lt;h3&gt;Authorization Filters in ASP.NET Web API&lt;/h3&gt; &lt;p&gt;An Authorization filter inherits from the AuthorizationFilterAttribute class and typically overrides the OnAuthorization() method which should handle the authorization tasks. The filter should do nothing to allow a request through if authorization is valid, throw a UnauthorizedException() if it fails to validate a user, or return a new custom HttpResponseMessage.&lt;/p&gt; &lt;p&gt;Here's the somewhat generic Authorization filter version I ended up with:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;summary&amp;gt;
/// &lt;/span&gt;&lt;span style=" color: green"&gt;Generic Basic Authentication filter that checks for basic authentication
&lt;/span&gt;&lt;span style=" color: gray"&gt;/// &lt;/span&gt;&lt;span style=" color: green"&gt;headers and challenges for authentication if no authentication is provided
&lt;/span&gt;&lt;span style=" color: gray"&gt;/// &lt;/span&gt;&lt;span style=" color: green"&gt;Sets the Thread Principle with a GenericAuthenticationPrincipal.
&lt;/span&gt;&lt;span style=" color: gray"&gt;/// 
/// &lt;/span&gt;&lt;span style=" color: green"&gt;You can override the OnAuthorize method for custom auth logic that
&lt;/span&gt;&lt;span style=" color: gray"&gt;/// &lt;/span&gt;&lt;span style=" color: green"&gt;might be application specific.    
&lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;/summary&amp;gt;
/// &amp;lt;remarks&amp;gt;&lt;/span&gt;&lt;span style=" color: green"&gt;Always remember that Basic Authentication passes username and passwords
&lt;/span&gt;&lt;span style=" color: gray"&gt;/// &lt;/span&gt;&lt;span style=" color: green"&gt;from client to server in plain text, so make sure SSL is used with basic auth
&lt;/span&gt;&lt;span style=" color: gray"&gt;/// &lt;/span&gt;&lt;span style=" color: green"&gt;to encode the Authorization header on all requests (not just the login).
&lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;/remarks&amp;gt;
&lt;/span&gt;&lt;span style=" color: black"&gt;[&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;AttributeUsage&lt;/span&gt;&lt;span style=" color: black"&gt;(&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;AttributeTargets&lt;/span&gt;&lt;span style=" color: black"&gt;.Class | &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;AttributeTargets&lt;/span&gt;&lt;span style=" color: black"&gt;.Method, AllowMultiple = &lt;/span&gt;&lt;span style=" color: blue"&gt;false&lt;/span&gt;&lt;span style=" color: black"&gt;)]
&lt;/span&gt;&lt;span style=" color: blue"&gt;public class &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;BasicAuthenticationFilter &lt;/span&gt;&lt;span style=" color: black"&gt;: &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;AuthorizationFilterAttribute
&lt;/span&gt;&lt;span style=" color: black"&gt;{
    &lt;/span&gt;&lt;span style=" color: blue"&gt;bool &lt;/span&gt;&lt;span style=" color: black"&gt;Active = &lt;/span&gt;&lt;span style=" color: blue"&gt;true&lt;/span&gt;&lt;span style=" color: black"&gt;;

    &lt;/span&gt;&lt;span style=" color: blue"&gt;public &lt;/span&gt;&lt;span style=" color: black"&gt;BasicAuthenticationFilter()
    { }

    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style=" color: green"&gt;Overriden constructor to allow explicit disabling of this
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &lt;/span&gt;&lt;span style=" color: green"&gt;filter's behavior. Pass false to disable (same as no filter
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &lt;/span&gt;&lt;span style=" color: green"&gt;but declarative)
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name="active"&amp;gt;&amp;lt;/param&amp;gt;
    &lt;/span&gt;&lt;span style=" color: blue"&gt;public &lt;/span&gt;&lt;span style=" color: black"&gt;BasicAuthenticationFilter(&lt;/span&gt;&lt;span style=" color: blue"&gt;bool &lt;/span&gt;&lt;span style=" color: black"&gt;active)
    {
        Active = active;
    }
        

    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style=" color: green"&gt;Override to Web API filter method to handle Basic Auth check
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name="actionContext"&amp;gt;&amp;lt;/param&amp;gt;
    &lt;/span&gt;&lt;span style=" color: blue"&gt;public override void &lt;/span&gt;&lt;span style=" color: black"&gt;OnAuthorization(&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;HttpActionContext &lt;/span&gt;&lt;span style=" color: black"&gt;actionContext)
    {
        &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(Active)
        {
            &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;identity = ParseAuthorizationHeader(actionContext);
            &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(identity == &lt;/span&gt;&lt;span style=" color: blue"&gt;null&lt;/span&gt;&lt;span style=" color: black"&gt;)
            {
                Challenge(actionContext);
                &lt;/span&gt;&lt;span style=" color: blue"&gt;return&lt;/span&gt;&lt;span style=" color: black"&gt;;
            }


            &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(!OnAuthorizeUser(identity.Name, identity.Password, actionContext))
            {
                Challenge(actionContext);
                &lt;/span&gt;&lt;span style=" color: blue"&gt;return&lt;/span&gt;&lt;span style=" color: black"&gt;;
            }
            
            &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;principal = &lt;/span&gt;&lt;span style=" color: blue"&gt;new &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;GenericPrincipal&lt;/span&gt;&lt;span style=" color: black"&gt;(identity, &lt;/span&gt;&lt;span style=" color: blue"&gt;null&lt;/span&gt;&lt;span style=" color: black"&gt;);

            &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;Thread&lt;/span&gt;&lt;span style=" color: black"&gt;.CurrentPrincipal = principal;

            &lt;/span&gt;&lt;span style=" color: green"&gt;// inside of ASP.NET this is required
            //if (HttpContext.Current != null)
            //    HttpContext.Current.User = principal;

            &lt;/span&gt;&lt;span style=" color: blue"&gt;base&lt;/span&gt;&lt;span style=" color: black"&gt;.OnAuthorization(actionContext);
        }
    }

    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style=" color: green"&gt;Base implementation for user authentication - you probably will
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &lt;/span&gt;&lt;span style=" color: green"&gt;want to override this method for application specific logic.
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// 
    /// &lt;/span&gt;&lt;span style=" color: green"&gt;The base implementation merely checks for username and password
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &lt;/span&gt;&lt;span style=" color: green"&gt;present and set the Thread principal.
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// 
    /// &lt;/span&gt;&lt;span style=" color: green"&gt;Override this method if you want to customize Authentication
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &lt;/span&gt;&lt;span style=" color: green"&gt;and store user data as needed in a Thread Principle or other
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &lt;/span&gt;&lt;span style=" color: green"&gt;Request specific storage.
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name="username"&amp;gt;&amp;lt;/param&amp;gt;
    /// &amp;lt;param name="password"&amp;gt;&amp;lt;/param&amp;gt;
    /// &amp;lt;param name="actionContext"&amp;gt;&amp;lt;/param&amp;gt;
    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;
    &lt;/span&gt;&lt;span style=" color: blue"&gt;protected virtual bool &lt;/span&gt;&lt;span style=" color: black"&gt;OnAuthorizeUser(&lt;/span&gt;&lt;span style=" color: blue"&gt;string &lt;/span&gt;&lt;span style=" color: black"&gt;username, &lt;/span&gt;&lt;span style=" color: blue"&gt;string &lt;/span&gt;&lt;span style=" color: black"&gt;password, &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;HttpActionContext &lt;/span&gt;&lt;span style=" color: black"&gt;actionContext)
    {
        &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(&lt;/span&gt;&lt;span style=" color: blue"&gt;string&lt;/span&gt;&lt;span style=" color: black"&gt;.IsNullOrEmpty(username) || &lt;/span&gt;&lt;span style=" color: blue"&gt;string&lt;/span&gt;&lt;span style=" color: black"&gt;.IsNullOrEmpty(password))
            &lt;/span&gt;&lt;span style=" color: blue"&gt;return false&lt;/span&gt;&lt;span style=" color: black"&gt;;

        &lt;/span&gt;&lt;span style=" color: blue"&gt;return true&lt;/span&gt;&lt;span style=" color: black"&gt;;
    }

    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style=" color: green"&gt;Parses the Authorization header and creates user credentials
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name="actionContext"&amp;gt;&amp;lt;/param&amp;gt;
    &lt;/span&gt;&lt;span style=" color: blue"&gt;protected virtual &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;BasicAuthenticationIdentity &lt;/span&gt;&lt;span style=" color: black"&gt;ParseAuthorizationHeader(&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;HttpActionContext &lt;/span&gt;&lt;span style=" color: black"&gt;actionContext)
    {
        &lt;/span&gt;&lt;span style=" color: blue"&gt;string &lt;/span&gt;&lt;span style=" color: black"&gt;authHeader = &lt;/span&gt;&lt;span style=" color: blue"&gt;null&lt;/span&gt;&lt;span style=" color: black"&gt;;
        &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;auth = actionContext.Request.Headers.Authorization;
        &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(auth != &lt;/span&gt;&lt;span style=" color: blue"&gt;null &lt;/span&gt;&lt;span style=" color: black"&gt;&amp;amp;&amp;amp; auth.Scheme == &lt;/span&gt;&lt;span style=" color: #a31515"&gt;"Basic"&lt;/span&gt;&lt;span style=" color: black"&gt;)
            authHeader = auth.Parameter;

        &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(&lt;/span&gt;&lt;span style=" color: blue"&gt;string&lt;/span&gt;&lt;span style=" color: black"&gt;.IsNullOrEmpty(authHeader))
            &lt;/span&gt;&lt;span style=" color: blue"&gt;return null&lt;/span&gt;&lt;span style=" color: black"&gt;;

        authHeader = &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;Encoding&lt;/span&gt;&lt;span style=" color: black"&gt;.Default.GetString(&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;Convert&lt;/span&gt;&lt;span style=" color: black"&gt;.FromBase64String(authHeader));

        &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;tokens = authHeader.Split(&lt;/span&gt;&lt;span style=" color: #a31515"&gt;':'&lt;/span&gt;&lt;span style=" color: black"&gt;);
        &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(tokens.Length &amp;lt; 2)
            &lt;/span&gt;&lt;span style=" color: blue"&gt;return null&lt;/span&gt;&lt;span style=" color: black"&gt;;

        &lt;/span&gt;&lt;span style=" color: blue"&gt;return new &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;BasicAuthenticationIdentity&lt;/span&gt;&lt;span style=" color: black"&gt;(tokens[0],tokens[1]);
    }


    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style=" color: green"&gt;Send the Authentication Challenge request
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name="message"&amp;gt;&amp;lt;/param&amp;gt;
    /// &amp;lt;param name="actionContext"&amp;gt;&amp;lt;/param&amp;gt;
    &lt;/span&gt;&lt;span style=" color: blue"&gt;void &lt;/span&gt;&lt;span style=" color: black"&gt;Challenge(&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;HttpActionContext &lt;/span&gt;&lt;span style=" color: black"&gt;actionContext)
    {
        &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;host = actionContext.Request.RequestUri.DnsSafeHost;
        actionContext.Response = actionContext.Request.CreateResponse(&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;HttpStatusCode&lt;/span&gt;&lt;span style=" color: black"&gt;.Unauthorized);
        actionContext.Response.Headers.Add(&lt;/span&gt;&lt;span style=" color: #a31515"&gt;"WWW-Authenticate"&lt;/span&gt;&lt;span style=" color: black"&gt;, &lt;/span&gt;&lt;span style=" color: blue"&gt;string&lt;/span&gt;&lt;span style=" color: black"&gt;.Format(&lt;/span&gt;&lt;span style=" color: #a31515"&gt;"Basic realm=\"{0}\""&lt;/span&gt;&lt;span style=" color: black"&gt;, host));
    }

}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;This code relies on a customized BasicAuthenticationIdentity class that extends the standard GenericIdentity with a password:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style=" color: blue"&gt;public class &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;BasicAuthenticationIdentity &lt;/span&gt;&lt;span style=" color: black"&gt;: &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;GenericIdentity
&lt;/span&gt;&lt;span style=" color: black"&gt;{
    &lt;/span&gt;&lt;span style=" color: blue"&gt;public &lt;/span&gt;&lt;span style=" color: black"&gt;BasicAuthenticationIdentity(&lt;/span&gt;&lt;span style=" color: blue"&gt;string &lt;/span&gt;&lt;span style=" color: black"&gt;name, &lt;/span&gt;&lt;span style=" color: blue"&gt;string &lt;/span&gt;&lt;span style=" color: black"&gt;password)
        : &lt;/span&gt;&lt;span style=" color: blue"&gt;base&lt;/span&gt;&lt;span style=" color: black"&gt;(name,&lt;/span&gt;&lt;span style=" color: #a31515"&gt;"Basic"&lt;/span&gt;&lt;span style=" color: black"&gt;)
    {
        &lt;/span&gt;&lt;span style=" color: blue"&gt;this&lt;/span&gt;&lt;span style=" color: black"&gt;.Password = password;
    }

    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style=" color: green"&gt;Basic Auth Password for custom authentication
    &lt;/span&gt;&lt;span style=" color: gray"&gt;/// &amp;lt;/summary&amp;gt;
    &lt;/span&gt;&lt;span style=" color: blue"&gt;public string &lt;/span&gt;&lt;span style=" color: black"&gt;Password { &lt;/span&gt;&lt;span style=" color: blue"&gt;get&lt;/span&gt;&lt;span style=" color: black"&gt;; &lt;/span&gt;&lt;span style=" color: blue"&gt;set&lt;/span&gt;&lt;span style=" color: black"&gt;; }
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;The implementation of the filter is pretty straight forward and handled in a few distinct steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parsing credentials into a BasicAuthenticationIdentity if available 
&lt;li&gt;If no credentials were found Challenge for Authorization (401 Response) 
&lt;li&gt;If credentials were found authorize the user based on the credentials 
&lt;li&gt;Set the ThreadPrinicipal (or HttpContext.User) if credentials are valid&lt;/li&gt;&lt;/ul&gt;
&lt;h3&gt;Basic Auth is - basic&lt;/h3&gt;
&lt;p&gt;One of the reasons basic auth is often fallen back to is that it's - basic. It's very simple to implement because the data travelling over the wire is simply a user name and password encoded as a base64 string separated by a :.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;username:password&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The whole thing is then base64 encoded:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;dXNlcm5hbWU6cGFzc3dvcmQ=&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;An inbound Authorization header from the client, that sends a username and password then looks like this:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Because it's so basic it's also fairly insecure. Remember in real world scenarios to use SSL with Basic Authentication accessed APIs to minimize exposure of the plain text username and password!&lt;/p&gt;
&lt;h3&gt;Authorization&lt;/h3&gt;
&lt;p&gt;The ParseAuthorizationHeader() method in the filter then decomposes the Authorization header and reconstitutes username and password into a BasicAuthenticationIdentity which simply holds the username and password so that the Authorization process can determine whether that user and password combination is valid.&lt;/p&gt;
&lt;p&gt;The filter contains a very simple OnAuthorize() method that can be overridden in a subclass. This method simply should return true or false and should implement any business logic necessary to determine whether the user is authorized or not. You can validate against a business object, or you could even validate against local or domain Windows accounts given that you have a username and password to work with.&lt;/p&gt;
&lt;p&gt;The default implementation simply checks for presence of the Authorization header and returns true.&lt;/p&gt;
&lt;p&gt;Here's an example of specialized BasicAuthenticationFilter that uses a business&amp;nbsp; object to validate the user:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style=" color: blue"&gt;public class &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;MyBasicAuthenticationFilter &lt;/span&gt;&lt;span style=" color: black"&gt;: &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;BasicAuthenticationFilter
&lt;/span&gt;&lt;span style=" color: black"&gt;{

    &lt;/span&gt;&lt;span style=" color: blue"&gt;public &lt;/span&gt;&lt;span style=" color: black"&gt;MyBasicAuthenticationFilter()
    { }

    &lt;/span&gt;&lt;span style=" color: blue"&gt;public &lt;/span&gt;&lt;span style=" color: black"&gt;MyBasicAuthenticationFilter(&lt;/span&gt;&lt;span style=" color: blue"&gt;bool &lt;/span&gt;&lt;span style=" color: black"&gt;active) : &lt;/span&gt;&lt;span style=" color: blue"&gt;base&lt;/span&gt;&lt;span style=" color: black"&gt;(active)            
    { }

&lt;/span&gt;&lt;span style=" color: gray"&gt;
    &lt;/span&gt;&lt;span style=" color: blue"&gt;protected override bool &lt;/span&gt;&lt;span style=" color: black"&gt;OnAuthorizeUser(&lt;/span&gt;&lt;span style=" color: blue"&gt;string &lt;/span&gt;&lt;span style=" color: black"&gt;username, &lt;/span&gt;&lt;span style=" color: blue"&gt;string &lt;/span&gt;&lt;span style=" color: black"&gt;password, &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;HttpActionContext &lt;/span&gt;&lt;span style=" color: black"&gt;actionContext)
    {
        &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;userBus = &lt;/span&gt;&lt;span style=" color: blue"&gt;new &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;BusUser&lt;/span&gt;&lt;span style=" color: black"&gt;();

        &lt;/span&gt;&lt;span style=" color: blue"&gt;var &lt;/span&gt;&lt;span style=" color: black"&gt;user = userBus.AuthenticateAndLoad(username, password);
        &lt;/span&gt;&lt;span style=" color: blue"&gt;if &lt;/span&gt;&lt;span style=" color: black"&gt;(user == &lt;/span&gt;&lt;span style=" color: blue"&gt;null&lt;/span&gt;&lt;span style=" color: black"&gt;)
            &lt;/span&gt;&lt;span style=" color: blue"&gt;return false&lt;/span&gt;&lt;span style=" color: black"&gt;;&lt;/span&gt;&lt;span style=" color: black"&gt;

        &lt;/span&gt;&lt;span style=" color: blue"&gt;return true&lt;/span&gt;&lt;span style=" color: black"&gt;;
    }
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;To use the filter now you can simply add the attribute to a controller you want to apply it to:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style=" color: black"&gt;[&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;MyBasicAuthenticationFilter&lt;/span&gt;&lt;span style=" color: black"&gt;]
&lt;/span&gt;&lt;span style=" color: blue"&gt;public class &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;QueueController &lt;/span&gt;&lt;span style=" color: black"&gt;: &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;ApiController&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;or you can globally apply it in the Web API configuration:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style=" color: #2b91af"&gt;GlobalConfiguration&lt;/span&gt;&lt;span style=" color: black"&gt;.Configuration.Filters.Add(&lt;/span&gt;&lt;span style=" color: blue"&gt;new &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;MyBasicAuthenticationFilter&lt;/span&gt;&lt;span style=" color: black"&gt;());&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Additionally you can also apply the filter attribute on an individual method to either enable or disable the authentication functionality.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style=" color: black"&gt;[&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;MarvelPressAuthorizationFilter&lt;/span&gt;&lt;span style=" color: black"&gt;(&lt;/span&gt;&lt;span style=" color: blue"&gt;false&lt;/span&gt;&lt;span style=" color: black"&gt;)]
[&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;GET&lt;/span&gt;&lt;span style=" color: black"&gt;(&lt;/span&gt;&lt;span style=" color: #a31515"&gt;"Queue"&lt;/span&gt;&lt;span style=" color: black"&gt;)]
&lt;/span&gt;&lt;span style=" color: blue"&gt;public &lt;/span&gt;&lt;span style=" color: #2b91af"&gt;IEnumerable&lt;/span&gt;&lt;span style=" color: black"&gt;&amp;lt;&lt;/span&gt;&lt;span style=" color: #2b91af"&gt;QueueMessageItem&lt;/span&gt;&lt;span style=" color: black"&gt;&amp;gt; GetRecentMessages(&lt;/span&gt;&lt;span style=" color: blue"&gt;string &lt;/span&gt;&lt;span style=" color: black"&gt;type = &lt;/span&gt;&lt;span style=" color: blue"&gt;null&lt;/span&gt;&lt;span style=" color: black"&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Generally I prefer the first approach, since in most of my apps I have at least one section where the authentication security doesn't apply. For this filter it probably doesn't matter, but if you're using something like token based security you might have a Login API that needs to be accessible without authentication. If you need to keep an individual method (like a Login method!) from firing authentication you can use the last approach and add an attribute with the active=false parameter.&lt;/p&gt;
&lt;p&gt;This works pretty well, and it's all fully self contained. What's also nice about this simple implementation is that you have some control over where it is applied. It can be assigned to global filters to fire against every request or against individual controllers and even individual action methods. With a MessageHandler this is considerably more involved as you have to coordinate between a MessageHandler and a Filter to decide where to apply the message handler.&lt;/p&gt;
&lt;h3&gt;Do we need a Message Handler?&lt;/h3&gt;
&lt;p&gt;Most other examples I looked at involved message handlers which are a bit more involved to set up and interact with. MessageHandlers in WebAPI are essentially pre-and post request filters that allow to manipulate the request on the way in the response on the way out. To effectively build an authentication message handler is a bit more work than the code I have above. MessageHandlers are also fully async so you have to deal with tasks (or async/await at least) in your code which adds some complexity.&lt;/p&gt;
&lt;p&gt;An authentication message handler typically only would have to deal with checking for authentication information in the HTTP headers and if not there fire the challenge requests. Authorization is left to other mechanisms - like a filter. The handler then sets up a principal that can be checked later. The handler also has to check the response output to determine whether to challenge the client. So with a Message Handler implementation you'd have a two fold implementation: the message handler plus an AuthorizationFilter to validate the user.&lt;/p&gt;
&lt;p&gt;For reference I also wrote &lt;a href="http://www.west-wind.com/weblog/posts/2013/Apr/30/A-WebAPI-Basic-Authentication-MessageHandler" target="_blank"&gt;a blog post about a Basic Authentication MessageHandler&lt;/a&gt;. It's a little more involved, but most of the code is similar, just a bit more scattered - you can check it out for yourself and take your pick from the two implementations.&lt;/p&gt;
&lt;p&gt;I do think that if you are building a generic authentication mechanism that is universally usable, then a MessageHandler makes sense. You can combine multiple message handlers and authentication schemes for example. &lt;/p&gt;
&lt;p&gt;But for simple use cases where you use a very application specific custom logon scheme - you are not going to care about other security implementations, so the filter actually makes sense because it keeps all the code for managing the authentication and authorization logically together. &lt;/p&gt;
&lt;p&gt;This has been a nice and simple and self-contained solution that's easy to reuse and I've used it on a few projects now. I hope some of you find this useful as well.&lt;/p&gt;
&lt;h3&gt;Resources&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/RickStrahl/WestwindToolkit/blob/master/Westwind.Web.WebApi/Filters/BasicAuthenticationFilter.cs" target="_blank"&gt;&lt;strong&gt;Full Source Code in GitHub Repository&lt;/strong&gt;&lt;/a&gt; 
&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.west-wind.com/weblog/posts/2013/Apr/30/A-WebAPI-Basic-Authentication-MessageHandler" target="_blank"&gt;MessageHandler Basic Authentication Implementation Post&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style='margin: 10px 0px'&gt;&lt;small&gt;© Rick Strahl, West Wind Technologies, 2005-2013&lt;/small&gt;&lt;/div&gt;&lt;div&gt;Posted in &lt;b&gt;&lt;a href='/Weblog/ShowPosts.aspx?Category=Web Api'&gt;Web Api&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href='/Weblog/ShowPosts.aspx?Category=Security'&gt;Security&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div style='margin-top: 5px;'&gt;
&lt;a href="https://twitter.com/share" class="twitter-share-button" data-text="A WebAPI Basic Authentication Authorization Filter" data-via="RickStrahl" data-lang="en" data-hashtags="" data-url="http://www.west-wind.com/weblog/posts/2013/Apr/18/A-WebAPI-Basic-Authentication-Authorization-Filter"&gt;Tweet&lt;/a&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");&lt;/script&gt;

&lt;g:plusone size="medium" href="http://www.west-wind.com/weblog/posts/2013/Apr/18/A-WebAPI-Basic-Authentication-Authorization-Filter" "&gt;&lt;/g:plusone&gt;
&lt;script type="text/javascript"&gt;
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;/div&gt;&lt;/small&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=u5GfOCYG_K8:7h6puuobOTM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=u5GfOCYG_K8:7h6puuobOTM:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=u5GfOCYG_K8:7h6puuobOTM:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=u5GfOCYG_K8:7h6puuobOTM:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=u5GfOCYG_K8:7h6puuobOTM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=u5GfOCYG_K8:7h6puuobOTM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=u5GfOCYG_K8:7h6puuobOTM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=u5GfOCYG_K8:7h6puuobOTM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=u5GfOCYG_K8:7h6puuobOTM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/u5GfOCYG_K8" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2013/Apr/18/A-WebAPI-Basic-Authentication-Authorization-Filter</feedburner:origLink></item>
    <item>
      <title>WebAPI: Getting Headers, QueryString and Cookie Values</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/vlZtxSG8rGE/WebAPI-Getting-Headers-QueryString-and-Cookie-Values</link>
      <guid isPermaLink="false">101264_201304151048</guid>
      <pubDate>Mon, 15 Apr 2013 10:48:44 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2013/Apr/15/WebAPI-Getting-Headers-QueryString-and-Cookie-Values#Comments</comments>
      <slash:comments>3</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=101264</wfw:commentRss>
      <category>Web Api</category>
      <description>Finally got tired to trying to remember how to get at the Headers, Cookies and QueryString 'collections' in Web API, since there's zero consistency and messy nested collections to deal with. Here's are a set of extension methods that make it easier.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=vlZtxSG8rGE:6z9X7rvcigc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=vlZtxSG8rGE:6z9X7rvcigc:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=vlZtxSG8rGE:6z9X7rvcigc:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=vlZtxSG8rGE:6z9X7rvcigc:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=vlZtxSG8rGE:6z9X7rvcigc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=vlZtxSG8rGE:6z9X7rvcigc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=vlZtxSG8rGE:6z9X7rvcigc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=vlZtxSG8rGE:6z9X7rvcigc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=vlZtxSG8rGE:6z9X7rvcigc:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/vlZtxSG8rGE" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2013/Apr/15/WebAPI-Getting-Headers-QueryString-and-Cookie-Values</feedburner:origLink></item>
    <item>
      <title>UNC Drive Mapping Failures: Network name cannot be found</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/GrYDt8TohP4/UNC-Drive-Mapping-Failures-Network-name-cannot-be-found</link>
      <guid isPermaLink="false">90916_201304050658</guid>
      <pubDate>Fri, 05 Apr 2013 06:58:00 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2013/Apr/04/UNC-Drive-Mapping-Failures-Network-name-cannot-be-found#Comments</comments>
      <slash:comments>6</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=90916</wfw:commentRss>
      <category>Windows</category>
      <description>Ran into a nasty issue yesterday trying to map a remote drive via UNC pathing. Basically I was unable to connect with failures occurring instantly and without prompting for credentials even when asking to use different credentials. Turns out the problem is the Network Provider Order - here's more info.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=GrYDt8TohP4:NKO-t4qBWBQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=GrYDt8TohP4:NKO-t4qBWBQ:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=GrYDt8TohP4:NKO-t4qBWBQ:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=GrYDt8TohP4:NKO-t4qBWBQ:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=GrYDt8TohP4:NKO-t4qBWBQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=GrYDt8TohP4:NKO-t4qBWBQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=GrYDt8TohP4:NKO-t4qBWBQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=GrYDt8TohP4:NKO-t4qBWBQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=GrYDt8TohP4:NKO-t4qBWBQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/GrYDt8TohP4" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2013/Apr/04/UNC-Drive-Mapping-Failures-Network-name-cannot-be-found</feedburner:origLink></item>
    <item>
      <title>A small, intra-app Object to String Serializer</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/SKcGpzcO-3M/A-small-intraapp-Object-to-String-Serializer</link>
      <guid isPermaLink="false">87530_201304010941</guid>
      <pubDate>Mon, 01 Apr 2013 09:41:14 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2013/Apr/01/A-small-intraapp-Object-to-String-Serializer#Comments</comments>
      <slash:comments>3</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=87530</wfw:commentRss>
      <category> ASP.NET</category>
      <category>.NET</category>
      <category>C#</category>
      <description>On a few occasions I've needed a very compact serializer for small and simple, flat object serialization, typically for storage in Cookies or a FormsAuthentication ticket in ASP.NET. XML and JSON serialization are too verbose for those scenarios so a simple property serializer that strings together the values was needed. Originally I did this by hand, but here is a class that automates the process.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=SKcGpzcO-3M:_f1ITNO7GE4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=SKcGpzcO-3M:_f1ITNO7GE4:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=SKcGpzcO-3M:_f1ITNO7GE4:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=SKcGpzcO-3M:_f1ITNO7GE4:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=SKcGpzcO-3M:_f1ITNO7GE4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=SKcGpzcO-3M:_f1ITNO7GE4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=SKcGpzcO-3M:_f1ITNO7GE4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=SKcGpzcO-3M:_f1ITNO7GE4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=SKcGpzcO-3M:_f1ITNO7GE4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/SKcGpzcO-3M" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2013/Apr/01/A-small-intraapp-Object-to-String-Serializer</feedburner:origLink></item>
    <item>
      <title>Experimenting with Online Backups</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/S8KwfvbiR7Q/Experimenting-with-Online-Backups</link>
      <guid isPermaLink="false">83258_201303272107</guid>
      <pubDate>Wed, 27 Mar 2013 21:07:23 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2013/Mar/27/Experimenting-with-Online-Backups#Comments</comments>
      <slash:comments>19</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=83258</wfw:commentRss>
      <category>Office</category>
      <description>I recently spent a bit of time looking at online synching/backup software to provide a little more resilience to my backup situation. Lots of choices but nothing that's really quite perfect yet. Here's what I found.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=S8KwfvbiR7Q:b187co4lK-o:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=S8KwfvbiR7Q:b187co4lK-o:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=S8KwfvbiR7Q:b187co4lK-o:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=S8KwfvbiR7Q:b187co4lK-o:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=S8KwfvbiR7Q:b187co4lK-o:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=S8KwfvbiR7Q:b187co4lK-o:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=S8KwfvbiR7Q:b187co4lK-o:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=S8KwfvbiR7Q:b187co4lK-o:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=S8KwfvbiR7Q:b187co4lK-o:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/S8KwfvbiR7Q" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2013/Mar/27/Experimenting-with-Online-Backups</feedburner:origLink></item>
    <item>
      <title>Firing an Entity Framework Database Initializer from within DbContext</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/anTacAcLQCQ/Firing-an-Entity-Framework-Database-Initializer-from-within-DbContext</link>
      <guid isPermaLink="false">81982_201303261953</guid>
      <pubDate>Tue, 26 Mar 2013 19:53:00 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2013/Mar/26/Firing-an-Entity-Framework-Database-Initializer-from-within-DbContext#Comments</comments>
      <slash:comments>4</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=81982</wfw:commentRss>
      <category>Entity Framework</category>
      <description>Database initializers in Entity Framework can be a pain, especially when you're using EF as part of smaller components that may or may not load into a database shared with other EF Contexts. Here's a small helper utility that lets you internalize the database initializer and fire it the first time the context is loaded.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=anTacAcLQCQ:2x5fLpw1rCE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=anTacAcLQCQ:2x5fLpw1rCE:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=anTacAcLQCQ:2x5fLpw1rCE:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=anTacAcLQCQ:2x5fLpw1rCE:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=anTacAcLQCQ:2x5fLpw1rCE:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=anTacAcLQCQ:2x5fLpw1rCE:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=anTacAcLQCQ:2x5fLpw1rCE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=anTacAcLQCQ:2x5fLpw1rCE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=anTacAcLQCQ:2x5fLpw1rCE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/anTacAcLQCQ" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2013/Mar/26/Firing-an-Entity-Framework-Database-Initializer-from-within-DbContext</feedburner:origLink></item>
    <item>
      <title>Text Editor Associations/Extensions in Visual Studio getting lost</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/NIsOCSgwE4I/Text-Editor-AssociationsExtensions-in-Visual-Studio-getting-lost</link>
      <guid isPermaLink="false">78823_201303230147</guid>
      <pubDate>Sat, 23 Mar 2013 01:47:46 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2013/Mar/22/Text-Editor-AssociationsExtensions-in-Visual-Studio-getting-lost#Comments</comments>
      <slash:comments>4</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=78823</wfw:commentRss>
      <category>Visual Studio</category>
      <description>Visual Studio allows you to create text editor extensions that map standard Visual Studio editors to custom extensions. It's a useful feature that I use a lot with some older products, but unfortunately I've seen alot of cases where the editor/extension mapping gets lost even though Visual Studio still shows it as registered. Here's more info on the problem and how to fix it at least temporarily.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=NIsOCSgwE4I:2N0tYnr6Y_U:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=NIsOCSgwE4I:2N0tYnr6Y_U:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=NIsOCSgwE4I:2N0tYnr6Y_U:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=NIsOCSgwE4I:2N0tYnr6Y_U:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=NIsOCSgwE4I:2N0tYnr6Y_U:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=NIsOCSgwE4I:2N0tYnr6Y_U:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=NIsOCSgwE4I:2N0tYnr6Y_U:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=NIsOCSgwE4I:2N0tYnr6Y_U:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=NIsOCSgwE4I:2N0tYnr6Y_U:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/NIsOCSgwE4I" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2013/Mar/22/Text-Editor-AssociationsExtensions-in-Visual-Studio-getting-lost</feedburner:origLink></item>
    <item>
      <title>Using plUpload to upload Files with ASP.NET</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/MAE6cG4UtMw/Using-plUpload-to-upload-Files-with-ASPNET</link>
      <guid isPermaLink="false">66501_201303121042</guid>
      <pubDate>Tue, 12 Mar 2013 10:42:00 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2013/Mar/12/Using-plUpload-to-upload-Files-with-ASPNET#Comments</comments>
      <slash:comments>14</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=66501</wfw:commentRss>
      <category> ASP.NET</category>
      <category>JavaScript</category>
      <description>plUpload is a popular client side multi-file upload component. In this article I describe a small library that abstracts the server side processing of uploaded files with an HTTP handler demonstrate putting it all together with a small Image Upload sample application.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=MAE6cG4UtMw:OrK7zZLroag:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=MAE6cG4UtMw:OrK7zZLroag:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=MAE6cG4UtMw:OrK7zZLroag:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=MAE6cG4UtMw:OrK7zZLroag:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=MAE6cG4UtMw:OrK7zZLroag:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=MAE6cG4UtMw:OrK7zZLroag:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=MAE6cG4UtMw:OrK7zZLroag:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=MAE6cG4UtMw:OrK7zZLroag:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=MAE6cG4UtMw:OrK7zZLroag:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/MAE6cG4UtMw" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2013/Mar/12/Using-plUpload-to-upload-Files-with-ASPNET</feedburner:origLink></item>
    <item>
      <title>Sql Connection Strings in .Config Files vs. Source Control</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/2ZbWuq5wJRA/Sql-Connection-Strings-in-Config-Files-vs-Source-Control</link>
      <guid isPermaLink="false">59057_201302272018</guid>
      <pubDate>Wed, 27 Feb 2013 20:18:56 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2013/Feb/27/Sql-Connection-Strings-in-Config-Files-vs-Source-Control#Comments</comments>
      <slash:comments>9</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=59057</wfw:commentRss>
      <category> ADO.NET</category>
      <category>.NET</category>
      <category>Entity Framework</category>
      <category>ASP.NET</category>
      <category>Source Control</category>
      <category>Deployment</category>
      <description>Connection strings in projects under source control can be problematic. Each Source Control user can potentially have different connection settings to use a database connection and these differences can't be easily reconciled via Source Control. Here are a couple of approaches that have worked for me to deal with this issue.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=2ZbWuq5wJRA:yJDZVwdFHvc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=2ZbWuq5wJRA:yJDZVwdFHvc:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=2ZbWuq5wJRA:yJDZVwdFHvc:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=2ZbWuq5wJRA:yJDZVwdFHvc:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=2ZbWuq5wJRA:yJDZVwdFHvc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=2ZbWuq5wJRA:yJDZVwdFHvc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=2ZbWuq5wJRA:yJDZVwdFHvc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=2ZbWuq5wJRA:yJDZVwdFHvc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=2ZbWuq5wJRA:yJDZVwdFHvc:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/2ZbWuq5wJRA" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2013/Feb/27/Sql-Connection-Strings-in-Config-Files-vs-Source-Control</feedburner:origLink></item>
    <item>
      <title>Visual Studio Web Publish Lockup? Check for invisible Window</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/AvstL_lZQ8g/Visual-Studio-Web-Publish-Lockup-Check-for-invisible-Window</link>
      <guid isPermaLink="false">54362_201302210825</guid>
      <pubDate>Thu, 21 Feb 2013 08:25:23 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2013/Feb/21/Visual-Studio-Web-Publish-Lockup-Check-for-invisible-Window#Comments</comments>
      <slash:comments>4</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=54362</wfw:commentRss>
      <category> Visual Studio</category>
      <category> ASP.NET</category>
      <description>If your Web Publish dialog appears to lock up Visual Studio when you click on the Publish option, most likely the Web Publish window is hidden on a second screen that is not currently visible. Here's how you can work around this annoying little bug.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=AvstL_lZQ8g:cnFUdlF3mJs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=AvstL_lZQ8g:cnFUdlF3mJs:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=AvstL_lZQ8g:cnFUdlF3mJs:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=AvstL_lZQ8g:cnFUdlF3mJs:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=AvstL_lZQ8g:cnFUdlF3mJs:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=AvstL_lZQ8g:cnFUdlF3mJs:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=AvstL_lZQ8g:cnFUdlF3mJs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=AvstL_lZQ8g:cnFUdlF3mJs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=AvstL_lZQ8g:cnFUdlF3mJs:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/AvstL_lZQ8g" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2013/Feb/21/Visual-Studio-Web-Publish-Lockup-Check-for-invisible-Window</feedburner:origLink></item>
    <item>
      <title>Building a better .NET Application Configuration Class - revisited</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/I41oCo7CAW4/Building-a-better-NET-Application-Configuration-Class-revisited</link>
      <guid isPermaLink="false">1563691_201212281241</guid>
      <pubDate>Fri, 28 Dec 2012 12:41:29 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2012/Dec/28/Building-a-better-NET-Application-Configuration-Class-revisited#Comments</comments>
      <slash:comments>17</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=1563691</wfw:commentRss>
      <category>.NET</category>
      <category>ASP.NET</category>
      <description>Managing configuration settings is an important part of successful applications. It should be easy to ensure that you can easily access and modify configuration values within your applications. If it's not - well things don't get parameterized as much as they should. In this post I discuss a custom Application Configuration class that makes it super easy to create reusable configuration objects in your applications using a code-first approach and the ability to persist configuration information into various types of configuration stores.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=I41oCo7CAW4:l267RuULx5Q:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=I41oCo7CAW4:l267RuULx5Q:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=I41oCo7CAW4:l267RuULx5Q:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=I41oCo7CAW4:l267RuULx5Q:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=I41oCo7CAW4:l267RuULx5Q:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=I41oCo7CAW4:l267RuULx5Q:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=I41oCo7CAW4:l267RuULx5Q:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=I41oCo7CAW4:l267RuULx5Q:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=I41oCo7CAW4:l267RuULx5Q:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/I41oCo7CAW4" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2012/Dec/28/Building-a-better-NET-Application-Configuration-Class-revisited</feedburner:origLink></item>
    <item>
      <title>Process.Start() and ShellExecute() fails with URLs on Windows 8</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/hSeR7Mp5FcQ/ProcessStart-and-ShellExecute-fails-with-URLs-on-Windows-8</link>
      <guid isPermaLink="false">1550562_201212130414</guid>
      <pubDate>Thu, 13 Dec 2012 04:14:30 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2012/Dec/12/ProcessStart-and-ShellExecute-fails-with-URLs-on-Windows-8#Comments</comments>
      <slash:comments>6</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=1550562</wfw:commentRss>
      <category>Windows</category>
      <category>.NET</category>
      <description>It appears that on Windows 8 there's a bug in the ShellExecute() API that causes failure in URL navigation when running under Administrative privileges.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=hSeR7Mp5FcQ:xJMkY-ZqIKc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=hSeR7Mp5FcQ:xJMkY-ZqIKc:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=hSeR7Mp5FcQ:xJMkY-ZqIKc:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=hSeR7Mp5FcQ:xJMkY-ZqIKc:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=hSeR7Mp5FcQ:xJMkY-ZqIKc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=hSeR7Mp5FcQ:xJMkY-ZqIKc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=hSeR7Mp5FcQ:xJMkY-ZqIKc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=hSeR7Mp5FcQ:xJMkY-ZqIKc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=hSeR7Mp5FcQ:xJMkY-ZqIKc:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/hSeR7Mp5FcQ" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2012/Dec/12/ProcessStart-and-ShellExecute-fails-with-URLs-on-Windows-8</feedburner:origLink></item>
    <item>
      <title>A Small Utility to Delete Files recursively by Date</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/Fb6ZfyB-hbk/A-Small-Utility-to-Delete-Files-recursively-by-Date</link>
      <guid isPermaLink="false">1539804_201212010513</guid>
      <pubDate>Sat, 01 Dec 2012 05:13:05 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2012/Nov/30/A-Small-Utility-to-Delete-Files-recursively-by-Date#Comments</comments>
      <slash:comments>7</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=1539804</wfw:commentRss>
      <category>Windows</category>
      <category>CSharp</category>
      <description>After again searching for a script or tool that can easily delete files recursively down a folder hierarchy with a date filter and coming up with several 'almost there' solutions I sat down and created a small Console app that handles this task. I've posted the resulting project on Github, with both the binary and source code, in case you ever find yourself with the same need.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=Fb6ZfyB-hbk:-30zhVNYzRs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=Fb6ZfyB-hbk:-30zhVNYzRs:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=Fb6ZfyB-hbk:-30zhVNYzRs:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=Fb6ZfyB-hbk:-30zhVNYzRs:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=Fb6ZfyB-hbk:-30zhVNYzRs:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=Fb6ZfyB-hbk:-30zhVNYzRs:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=Fb6ZfyB-hbk:-30zhVNYzRs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=Fb6ZfyB-hbk:-30zhVNYzRs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=Fb6ZfyB-hbk:-30zhVNYzRs:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/Fb6ZfyB-hbk" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2012/Nov/30/A-Small-Utility-to-Delete-Files-recursively-by-Date</feedburner:origLink></item>
    <item>
      <title>Set-Cookie Headers getting stripped in ASP.NET HttpHandlers</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/sp7QuFdX2rI/SetCookie-Headers-getting-stripped-in-ASPNET-HttpHandlers</link>
      <guid isPermaLink="false">1538673_201211300138</guid>
      <pubDate>Fri, 30 Nov 2012 01:38:26 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2012/Nov/29/SetCookie-Headers-getting-stripped-in-ASPNET-HttpHandlers#Comments</comments>
      <slash:comments>3</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=1538673</wfw:commentRss>
      <category>ASP.NET</category>
      <category> IIS7</category>
      <description>Ran into a nasty problem with Cookies not getting sent in HttpHandler code when using Response.AppendHandler() with the Set-Cookie key. It turns out it's a very narrow edge case, but one that can bite in unexpected system level applications.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=sp7QuFdX2rI:dmxCrte4GAk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=sp7QuFdX2rI:dmxCrte4GAk:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=sp7QuFdX2rI:dmxCrte4GAk:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=sp7QuFdX2rI:dmxCrte4GAk:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=sp7QuFdX2rI:dmxCrte4GAk:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=sp7QuFdX2rI:dmxCrte4GAk:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=sp7QuFdX2rI:dmxCrte4GAk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=sp7QuFdX2rI:dmxCrte4GAk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=sp7QuFdX2rI:dmxCrte4GAk:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/sp7QuFdX2rI" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2012/Nov/29/SetCookie-Headers-getting-stripped-in-ASPNET-HttpHandlers</feedburner:origLink></item>
    <item>
      <title>WCF WS-Security and WSE Nonce Authentication</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/744pK_SH_zw/WCF-WSSecurity-and-WSE-Nonce-Authentication</link>
      <guid isPermaLink="false">1532939_201211241331</guid>
      <pubDate>Sat, 24 Nov 2012 13:31:00 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2012/Nov/24/WCF-WSSecurity-and-WSE-Nonce-Authentication#Comments</comments>
      <slash:comments>5</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=1532939</wfw:commentRss>
      <category>WCF</category>
      <category>Web Services</category>
      <description>I ran into a Web Service last week that required WS-Security headers with an embedded nonce value. Unfortunately WCF doesn't support this particular protocol directly. Here's how to create custom credentials and a tokenizer to write out the customized WS-Security header.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=744pK_SH_zw:BLNQ6k1i--Y:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=744pK_SH_zw:BLNQ6k1i--Y:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=744pK_SH_zw:BLNQ6k1i--Y:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=744pK_SH_zw:BLNQ6k1i--Y:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=744pK_SH_zw:BLNQ6k1i--Y:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=744pK_SH_zw:BLNQ6k1i--Y:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=744pK_SH_zw:BLNQ6k1i--Y:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=744pK_SH_zw:BLNQ6k1i--Y:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=744pK_SH_zw:BLNQ6k1i--Y:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/744pK_SH_zw" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2012/Nov/24/WCF-WSSecurity-and-WSE-Nonce-Authentication</feedburner:origLink></item>
    <item>
      <title>Windows 8 Live Accounts and the actual Windows Account</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/hDgF3L02VRM/Windows-8-Live-Accounts-and-the-actual-Windows-Account</link>
      <guid isPermaLink="false">1528874_201211200410</guid>
      <pubDate>Tue, 20 Nov 2012 04:10:30 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2012/Nov/19/Windows-8-Live-Accounts-and-the-actual-Windows-Account#Comments</comments>
      <slash:comments>2</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=1528874</wfw:commentRss>
      <category>Windows</category>
      <description>When you log on with a Windows Live account in Windows 8, what really happens to your credentials? It's not quite obvious, so here are a few thoughts and examples that demonstrate the relationship between Windows and Live accounts.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=hDgF3L02VRM:oUgiCFFxko8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=hDgF3L02VRM:oUgiCFFxko8:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=hDgF3L02VRM:oUgiCFFxko8:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=hDgF3L02VRM:oUgiCFFxko8:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=hDgF3L02VRM:oUgiCFFxko8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=hDgF3L02VRM:oUgiCFFxko8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=hDgF3L02VRM:oUgiCFFxko8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=hDgF3L02VRM:oUgiCFFxko8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=hDgF3L02VRM:oUgiCFFxko8:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/hDgF3L02VRM" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2012/Nov/19/Windows-8-Live-Accounts-and-the-actual-Windows-Account</feedburner:origLink></item>
    <item>
      <title>DevConnections Session Slides, Samples and Links</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/JbGLCNkZ4jk/DevConnections-Session-Slides-Samples-and-Links</link>
      <guid isPermaLink="false">1518345_201211131320</guid>
      <pubDate>Tue, 13 Nov 2012 13:20:02 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2012/Nov/13/DevConnections-Session-Slides-Samples-and-Links#Comments</comments>
      <slash:comments>2</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=1518345</wfw:commentRss>
      <category>Conferences</category>
      <category>ASP.NET</category>
      <description>Finally getting around to posting links to my DevConnections session in Vegas a couple of weeks ago. It was a fun time after a long absence from speaking...&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=JbGLCNkZ4jk:kjZE18m_GyQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=JbGLCNkZ4jk:kjZE18m_GyQ:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=JbGLCNkZ4jk:kjZE18m_GyQ:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=JbGLCNkZ4jk:kjZE18m_GyQ:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=JbGLCNkZ4jk:kjZE18m_GyQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=JbGLCNkZ4jk:kjZE18m_GyQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=JbGLCNkZ4jk:kjZE18m_GyQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=JbGLCNkZ4jk:kjZE18m_GyQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=JbGLCNkZ4jk:kjZE18m_GyQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/JbGLCNkZ4jk" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2012/Nov/13/DevConnections-Session-Slides-Samples-and-Links</feedburner:origLink></item>
    <item>
      <title>HTML5 Input type=date Formatting Issues</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/WRq49mua9ig/HTML5-Input-typedate-Formatting-Issues</link>
      <guid isPermaLink="false">1513858_201211090227</guid>
      <pubDate>Fri, 09 Nov 2012 02:27:09 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2012/Nov/08/HTML5-Input-typedate-Formatting-Issues#Comments</comments>
      <slash:comments>3</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=1513858</wfw:commentRss>
      <category>HTML5</category>
      <category>HTML</category>
      <description>The new HTML5 Input types make it easier to display special formatted input types like dates and email addresses. Browsers that support them display a nice UI for editing and can validate values. However, support currently is limited and date formatting especially is complex as it involves using an ISO date format that doesn't fall back nicely to non-supporting browsers.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=WRq49mua9ig:JgfrK-NiyFY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=WRq49mua9ig:JgfrK-NiyFY:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=WRq49mua9ig:JgfrK-NiyFY:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=WRq49mua9ig:JgfrK-NiyFY:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=WRq49mua9ig:JgfrK-NiyFY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=WRq49mua9ig:JgfrK-NiyFY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=WRq49mua9ig:JgfrK-NiyFY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=WRq49mua9ig:JgfrK-NiyFY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=WRq49mua9ig:JgfrK-NiyFY:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/WRq49mua9ig" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2012/Nov/08/HTML5-Input-typedate-Formatting-Issues</feedburner:origLink></item>
    <item>
      <title>Back to Basics: When does a .NET Assembly Dependency get loaded</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/j0Hqfm81L1A/Back-to-Basics-When-does-a-NET-Assembly-Dependency-get-loaded</link>
      <guid isPermaLink="false">1509201_201211032339</guid>
      <pubDate>Sat, 03 Nov 2012 23:39:12 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2012/Nov/03/Back-to-Basics-When-does-a-NET-Assembly-Dependency-get-loaded#Comments</comments>
      <slash:comments>4</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=1509201</wfw:commentRss>
      <category>.NET</category>
      <category>CSharp</category>
      <description>Assembly loading in .NET is often a cause of confusion. So many times I've heard how evil it is to add a reference to some big assembly, if it's just a minor feature. But .NET is really smart in assembly loading and by default uses just in time loading of referenced assemblies. In this post I review when assemblies are loaded with a few simple examples that demonstrate the process.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=j0Hqfm81L1A:Q0adoX2wdR8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=j0Hqfm81L1A:Q0adoX2wdR8:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=j0Hqfm81L1A:Q0adoX2wdR8:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=j0Hqfm81L1A:Q0adoX2wdR8:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=j0Hqfm81L1A:Q0adoX2wdR8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=j0Hqfm81L1A:Q0adoX2wdR8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=j0Hqfm81L1A:Q0adoX2wdR8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=j0Hqfm81L1A:Q0adoX2wdR8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=j0Hqfm81L1A:Q0adoX2wdR8:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/j0Hqfm81L1A" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2012/Nov/03/Back-to-Basics-When-does-a-NET-Assembly-Dependency-get-loaded</feedburner:origLink></item>
    <item>
      <title>Caveats with the runAllManagedModulesForAllRequests in IIS 7/8</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/6YRd7y82bT8/Caveats-with-the-runAllManagedModulesForAllRequests-in-IIS-78</link>
      <guid isPermaLink="false">1495164_201210260615</guid>
      <pubDate>Fri, 26 Oct 2012 06:15:00 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2012/Oct/25/Caveats-with-the-runAllManagedModulesForAllRequests-in-IIS-78#Comments</comments>
      <slash:comments>5</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=1495164</wfw:commentRss>
      <category> IIS7</category>
      <category> ASP.NET</category>
      <description>IIS 7 and 8 support using Managed Modules to handle access to all IIS request content which is very powerful. But sometimes you actually want to not handle non-ASP.NET content and it's not very obvious how to minimize access to non-ASP.NET requests in managed modules.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=6YRd7y82bT8:ua2oO70Z0SU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=6YRd7y82bT8:ua2oO70Z0SU:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=6YRd7y82bT8:ua2oO70Z0SU:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=6YRd7y82bT8:ua2oO70Z0SU:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=6YRd7y82bT8:ua2oO70Z0SU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=6YRd7y82bT8:ua2oO70Z0SU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=6YRd7y82bT8:ua2oO70Z0SU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=6YRd7y82bT8:ua2oO70Z0SU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=6YRd7y82bT8:ua2oO70Z0SU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/6YRd7y82bT8" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2012/Oct/25/Caveats-with-the-runAllManagedModulesForAllRequests-in-IIS-78</feedburner:origLink></item>
    <item>
      <title>Dynamic Code for type casting Generic Types 'generically' in C#</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/9QPrvhngzyo/Dynamic-Code-for-type-casting-Generic-Types-generically-in-C</link>
      <guid isPermaLink="false">1492890_201210230906</guid>
      <pubDate>Tue, 23 Oct 2012 09:06:26 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2012/Oct/23/Dynamic-Code-for-type-casting-Generic-Types-generically-in-C#Comments</comments>
      <slash:comments>9</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=1492890</wfw:commentRss>
      <category>CSharp</category>
      <description>Here's a short entry on how dynamic can be a life saver when you can't cast a type between multiple objects, specifically when the object in question is a generic type without a common base type to cast to.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=9QPrvhngzyo:7XJrpwN5v-I:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=9QPrvhngzyo:7XJrpwN5v-I:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=9QPrvhngzyo:7XJrpwN5v-I:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=9QPrvhngzyo:7XJrpwN5v-I:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=9QPrvhngzyo:7XJrpwN5v-I:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=9QPrvhngzyo:7XJrpwN5v-I:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=9QPrvhngzyo:7XJrpwN5v-I:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=9QPrvhngzyo:7XJrpwN5v-I:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=9QPrvhngzyo:7XJrpwN5v-I:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/9QPrvhngzyo" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2012/Oct/23/Dynamic-Code-for-type-casting-Generic-Types-generically-in-C</feedburner:origLink></item>
    <item>
      <title>A tiny Utility to recycle an IIS Application Pool</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/6MQRQCu5VuY/A-tiny-Utility-to-recycle-an-IIS-Application-Pool</link>
      <guid isPermaLink="false">1474638_201210021029</guid>
      <pubDate>Tue, 02 Oct 2012 10:29:36 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2012/Oct/02/A-tiny-Utility-to-recycle-an-IIS-Application-Pool#Comments</comments>
      <slash:comments>9</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=1474638</wfw:commentRss>
      <category> IIS7</category>
      <category>.NET</category>
      <category>Windows</category>
      <description>Here's a small console app to recycle an Application Pool which seems to be something I've needed to do repeatedly in the past.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=6MQRQCu5VuY:DvUP4pZIHGU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=6MQRQCu5VuY:DvUP4pZIHGU:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=6MQRQCu5VuY:DvUP4pZIHGU:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=6MQRQCu5VuY:DvUP4pZIHGU:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=6MQRQCu5VuY:DvUP4pZIHGU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=6MQRQCu5VuY:DvUP4pZIHGU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=6MQRQCu5VuY:DvUP4pZIHGU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=6MQRQCu5VuY:DvUP4pZIHGU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=6MQRQCu5VuY:DvUP4pZIHGU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/6MQRQCu5VuY" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2012/Oct/02/A-tiny-Utility-to-recycle-an-IIS-Application-Pool</feedburner:origLink></item>
    <item>
      <title>Creating STA COM compatible ASP.NET Applications</title>
      <link>http://feedproxy.google.com/~r/RickStrahl/~3/3gPzQuF6Q2s/Creating-STA-COM-compatible-ASPNET-Applications</link>
      <guid isPermaLink="false">1462789_201209190136</guid>
      <pubDate>Wed, 19 Sep 2012 01:36:42 GMT</pubDate>
      <dc:creator>Rick Strahl</dc:creator>
      <comments>http://www.west-wind.com/weblog/posts/2012/Sep/18/Creating-STA-COM-compatible-ASPNET-Applications#Comments</comments>
      <slash:comments>17</slash:comments>
      <wfw:commentRss>http://west-wind.com/weblog/commentrss.aspx?id=1462789</wfw:commentRss>
      <category>FoxPro</category>
      <category> ASP.NET</category>
      <category>.NET</category>
      <category>COM</category>
      <description>When it comes to deploying STA COM components in ASP.NET only WebForms has native support for STA component. Other technologies like MVC, ASMX Web Services and WCF run only in MTA mode. If you need to run your STA COM Components in ASP.NET here is what you need to know and a few tools that help you create STA compatible handlers.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=3gPzQuF6Q2s:vxLnq1VWPWw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=3gPzQuF6Q2s:vxLnq1VWPWw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=3gPzQuF6Q2s:vxLnq1VWPWw:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=3gPzQuF6Q2s:vxLnq1VWPWw:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=3gPzQuF6Q2s:vxLnq1VWPWw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=3gPzQuF6Q2s:vxLnq1VWPWw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=3gPzQuF6Q2s:vxLnq1VWPWw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?i=3gPzQuF6Q2s:vxLnq1VWPWw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RickStrahl?a=3gPzQuF6Q2s:vxLnq1VWPWw:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RickStrahl?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RickStrahl/~4/3gPzQuF6Q2s" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.west-wind.com/weblog/posts/2012/Sep/18/Creating-STA-COM-compatible-ASPNET-Applications</feedburner:origLink></item>
  </channel>
</rss>
