<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>C# on Strathweb. A free flowing tech monologue.</title>
    <link>https://www.strathweb.com/categories/c-sharp/</link>
    <description>Recent content in C# on Strathweb. A free flowing tech monologue.</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 23 Jan 2026 07:30:00 +0000</lastBuildDate><atom:link href="https://www.strathweb.com/categories/c-sharp/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>(Maybe) LibOQS.NET 0.3.0: with liboqs 0.15.0, full suite of algorithms and other new features</title>
      <link>https://www.strathweb.com/2026/01/liboqs-net-0-3-0-liboqs-0-15-0-full-suite-of-algorithms-and-other-new-features/</link>
      <pubDate>Fri, 23 Jan 2026 07:30:00 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2026/01/liboqs-net-0-3-0-liboqs-0-15-0-full-suite-of-algorithms-and-other-new-features/</guid>
      <description>&lt;p&gt;Following the initial introduction of &lt;a href=&#34;https://github.com/filipw/maybe-liboqs-dotnet&#34;&gt;(Maybe) LibOQS.NET&lt;/a&gt; a few months ago, the post-quantum cryptography landscape has continued to move rapidly. To keep pace with these developments, the library has undergone significant updates to provide broader algorithm support and deeper integration with the underlying native tooling.&lt;/p&gt;
&lt;p&gt;Today marks the release of &lt;a href=&#34;https://github.com/filipw/maybe-liboqs-dotnet/releases&#34;&gt;version 0.3.0&lt;/a&gt;, a major milestone that brings the wrapper up to date with &lt;a href=&#34;https://github.com/open-quantum-safe/liboqs/releases/tag/0.15.0&#34;&gt;liboqs 0.15.0&lt;/a&gt;. This release is more than just a version bump; it exposes pretty much all of the liboqs algorithms to .NET developers and adds support for signature context strings, as well as the ability to perform deterministic (derandomized) KEM operations.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 2.0 is out with .NET 10.0 support</title>
      <link>https://www.strathweb.com/2025/11/dotnet-script-2-0-is-out-with-net-10-0-support/</link>
      <pubDate>Mon, 17 Nov 2025 06:19:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/11/dotnet-script-2-0-is-out-with-net-10-0-support/</guid>
      <description>&lt;p&gt;Last week, we &lt;a href=&#34;https://github.com/dotnet-script/dotnet-script/releases/tag/2.0.0&#34;&gt;released&lt;/a&gt; version 2.0 of &lt;a href=&#34;https://github.com/dotnet-script/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt;. The latest release introduces support for .NET 10.0 and C# 14 and is available, as usually, through Github releases and on Nuget. You will need to have at least the .NET SDK &lt;a href=&#34;https://dotnet.microsoft.com/download/dotnet/10.0&#34;&gt;10.0.100&lt;/a&gt; installed.&lt;/p&gt;
&lt;p&gt;It is the first major release of dotnet-script since version 1.0, which was released back in 2020. At the same time, the breaking changes are minimal, and the revision is mostly driven by the careful application of semantic versioning principles.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introducing (Maybe) LibOQS.NET - a post quantum cryptography library for .NET</title>
      <link>https://www.strathweb.com/2025/09/introducing-maybe-liboqs-net-a-post-quantum-crypto-library-for-net/</link>
      <pubDate>Tue, 23 Sep 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/09/introducing-maybe-liboqs-net-a-post-quantum-crypto-library-for-net/</guid>
      <description>&lt;p&gt;Over recent years I have been involved in the post-quantum cryptography community, especially from the .NET angle - trying to streamline integration of PQC into .NET space and raise the awareness of developers via various &lt;a href=&#34;https://www.strathweb.com/categories/pqc/&#34;&gt;projects, samples and articles&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this spirit, I would like to announce today a library called &lt;a href=&#34;https://github.com/filipw/maybe-liboqs-dotnet&#34;&gt;(Maybe) LibOQS.NET&lt;/a&gt;, which is a thin wrapper around &lt;a href=&#34;https://openquantumsafe.org/&#34;&gt;liboqs&lt;/a&gt;, a C library providing implementations for all post-quantum cryptography algorithms. This includes both the standardized ones, like ML-KEM, ML-DSA and SLH-DSA, as well as the ones currently undergoing standarization and under active research and development.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ML-KEM and ML-DSA Post-Quantum Cryptography in Windows</title>
      <link>https://www.strathweb.com/2025/08/ml-kem-and-ml-dsa-post-quantum-cryptography-in-windows/</link>
      <pubDate>Thu, 28 Aug 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/08/ml-kem-and-ml-dsa-post-quantum-cryptography-in-windows/</guid>
      <description>&lt;p&gt;Following up on my &lt;a href=&#34;https://www.strathweb.com/categories/pqc/&#34;&gt;recent posts&lt;/a&gt; about ML-KEM and ML-DSA post-quantum cryptography in .NET using &lt;a href=&#34;https://www.strathweb.com/2025/02/ml-kem-and-ml-dsa-post-quantum-cryptography-in-net/&#34;&gt;BouncyCastle.NET&lt;/a&gt;, I wanted to share an interesting development on the Windows side. Microsoft has recently &lt;a href=&#34;https://techcommunity.microsoft.com/blog/microsoft-security-blog/post-quantum-cryptography-comes-to-windows-insiders-and-linux/4413803&#34;&gt;announced post-quantum cryptography support&lt;/a&gt; in Windows through their Cryptography API: Next Generation (CNG) libraries.&lt;/p&gt;
&lt;p&gt;This development provides an alternative to third-party libraries for quantum-resistant cryptography on Windows systems. The implementation offers direct OS integration and follows standard .NET patterns for cryptographic operations.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ML-KEM and ML-DSA Post-Quantum Cryptography in .NET</title>
      <link>https://www.strathweb.com/2025/02/ml-kem-and-ml-dsa-post-quantum-cryptography-in-net/</link>
      <pubDate>Fri, 14 Feb 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/02/ml-kem-and-ml-dsa-post-quantum-cryptography-in-net/</guid>
      <description>&lt;p&gt;Some time ago, I wrote a post about &lt;a href=&#34;https://www.strathweb.com/2023/02/post-quantum-cryptography-in-net/&#34;&gt;post-quantum cryptography in .NET&lt;/a&gt;, where I introduced the concept of post-quantum cryptography and discussed the early &lt;a href=&#34;https://www.bouncycastle.org&#34;&gt;BouncyCastle.NET&lt;/a&gt; implementation of Kyber and Dilithium. Today I would like to revisit this post, as both of these algorithms have been officially standardized as ML-KEM and ML-DSA.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Strathweb.Dilithium for Duende Identity Server now supports automatic key management</title>
      <link>https://www.strathweb.com/2024/08/strathweb-dilithium-for-duende-identity-server-now-supports-automatic-key-management/</link>
      <pubDate>Fri, 23 Aug 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/08/strathweb-dilithium-for-duende-identity-server-now-supports-automatic-key-management/</guid>
      <description>&lt;p&gt;Earlier this week, I released version 0.2.0 of my post-quantum cryptography helper library .NET, &lt;a href=&#34;https://github.com/filipw/Strathweb.Dilithium&#34;&gt;Strathweb.Dilithium&lt;/a&gt;, which introduces a new feature - automatic key management support in Duende Identity Server. This feature plugs into the automatic key management capabilities of Duende Identity Server, and allows you to automatically generate and manage Dilithium keys for token signing purposes, without having to manually handle the key generation and rotation.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 1.5 is out with .NET 8.0 support</title>
      <link>https://www.strathweb.com/2023/11/dotnet-script-1-5-is-out-with-net-8-0-support/</link>
      <pubDate>Wed, 15 Nov 2023 16:19:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/11/dotnet-script-1-5-is-out-with-net-8-0-support/</guid>
      <description>&lt;p&gt;This morning, we &lt;a href=&#34;https://github.com/dotnet-script/dotnet-script/releases/tag/1.5.0&#34;&gt;released&lt;/a&gt; version 1.5 of &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt;. The latest release introduces support for .NET 8.0 and C# 12 and is available, as usually, through Github releases and on Nuget. You will need to have at least the .NET SDK &lt;a href=&#34;https://dotnet.microsoft.com/download/dotnet/8.0&#34;&gt;8.0.100&lt;/a&gt; installed to take advantage of that feature set.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Announcing Strathweb.Dilithium - a set of ASP.NET helper libraries for post quantum cryptography</title>
      <link>https://www.strathweb.com/2023/08/announcing-strathweb-dilithium-a-set-of-net-helper-libraries-for-post-quantum-cryptography/</link>
      <pubDate>Tue, 22 Aug 2023 18:00:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/08/announcing-strathweb-dilithium-a-set-of-net-helper-libraries-for-post-quantum-cryptography/</guid>
      <description>&lt;p&gt;Earlier this year I blogged about post-quantum cryptography in .NET using &lt;a href=&#34;https://www.strathweb.com/2023/02/post-quantum-cryptography-in-net/&#34;&gt;Dilithium and Kyber&lt;/a&gt;. This was then followed by &lt;a href=&#34;https://www.strathweb.com/2023/03/post-quantum-token-signing-with-dilithium-using-duende-identity-server/&#34;&gt;another post&lt;/a&gt;, which showed how Dilithium can be wired into a popular .NET Identity Server, &lt;a href=&#34;https://duendesoftware.com/products/identityserver&#34;&gt;Duende Identity Server&lt;/a&gt;, for token signing purposes.&lt;/p&gt;
&lt;p&gt;Today I would like to announce &lt;a href=&#34;https://github.com/filipw/Strathweb.Dilithium&#34;&gt;Strathweb.Dilithium&lt;/a&gt;, a set of .NET helper libraries to facilitate working with Dilithium in ASP.NET Core projects.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Post quantum cryptography in .NET</title>
      <link>https://www.strathweb.com/2023/02/post-quantum-cryptography-in-net/</link>
      <pubDate>Tue, 21 Feb 2023 11:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/02/post-quantum-cryptography-in-net/</guid>
      <description>&lt;p&gt;I have written extensively about &lt;a href=&#34;https://www.strathweb.com/categories/quantum-computing&#34;&gt;quantum computing&lt;/a&gt; on this blog before. Quantum computing has the potential to break many of the cryptographic systems that we use today. Shor&amp;rsquo;s algorithm, for example, can efficiently factor large numbers, which would make widely-used asymmetric cryptography schemes such as RSA and elliptic curves insecure.&lt;/p&gt;
&lt;p&gt;In this post, we&amp;rsquo;ll explore how to use post-quantum cryptography from a C# program, using CRYSTALS-Kyber and CRYSTALS-Dilithium as examples.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 1.4 is out with .NET 7.0 support</title>
      <link>https://www.strathweb.com/2022/11/dotnet-script-1-4-is-out-with-net-7-0-support/</link>
      <pubDate>Wed, 30 Nov 2022 16:19:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/11/dotnet-script-1-4-is-out-with-net-7-0-support/</guid>
      <description>&lt;p&gt;This week we &lt;a href=&#34;https://github.com/dotnet-script/dotnet-script/releases/tag/1.4.0&#34;&gt;released&lt;/a&gt; version 1.4 of &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt;. The latest release introduces support for .NET 7.0 and C# 11 and is available, as usually, through Github releases and on Nuget. You will need to have at least the .NET SDK &lt;a href=&#34;https://dotnet.microsoft.com/download/dotnet/7.0&#34;&gt;7.0.100&lt;/a&gt; installed.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using an existing Startup class with ASP.NET 6 minimal hosting model</title>
      <link>https://www.strathweb.com/2022/02/using-an-existing-startup-class-with-asp-net-6-minimal-hosting-model/</link>
      <pubDate>Mon, 28 Feb 2022 17:28:36 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/02/using-an-existing-startup-class-with-asp-net-6-minimal-hosting-model/</guid>
      <description>&lt;p&gt;With the .NET Core 2.1 having reached end of life, and the looming end of life dates for .NET 5 (this spring) and .NET Core 3.1 (this fall), a lot of developers are facing migrating their services to .NET 6.0. Depending on the customization level and the sheer scale of your service ecosystem this may be an easy or relatively complicated task - especially if you would like to additionally tap into the new lightweight hosting model around &lt;em&gt;WebApplication&lt;/em&gt; type.&lt;/p&gt;
&lt;p&gt;A very low-cost, easy approach to this is to take advantage of the fact that one can easily reuse an existing &lt;em&gt;Startup&lt;/em&gt; class with the new hosting model too. This allows leaving most of the code intact, and performing only tiny refactorings around the host bootstrapping.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 1.2 is out with assembly isolation feature</title>
      <link>https://www.strathweb.com/2021/09/dotnet-script-1-2-is-out-with-assembly-isolation-feature/</link>
      <pubDate>Thu, 30 Sep 2021 14:33:15 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/09/dotnet-script-1-2-is-out-with-assembly-isolation-feature/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/filipw/dotnet-script/releases/tag/1.2.0&#34;&gt;Last month&lt;/a&gt; we released version 1.2 of &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt;. This was already 36th release of the tool and I am proud to say all the dotnet-script releated packages on &lt;a href=&#34;https://www.nuget.org/packages?q=dotnet-script&#34;&gt;Nuget&lt;/a&gt; have passed 1 million downloads - thanks a lot!&lt;/p&gt;
&lt;p&gt;The latest release (which already has a 1.2.1 patch too), contains several useful bug fixes, including a memory leak and one excellent new feature - assembly isolation.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Eager refresh of values for AsyncExpiringLazy</title>
      <link>https://www.strathweb.com/2021/07/eager-refresh-of-values-for-asyncexpiringlazy/</link>
      <pubDate>Tue, 27 Jul 2021 09:33:33 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/07/eager-refresh-of-values-for-asyncexpiringlazy/</guid>
      <description>&lt;p&gt;Some time ago &lt;a href=&#34;https://www.strathweb.com/2016/11/lazy-async-initialization-for-expiring-objects/&#34;&gt;I blogged&lt;/a&gt; about introducing a new library, called &lt;a href=&#34;https://www.nuget.org/packages/Strathweb.AsyncExpiringLazy/2.1.0&#34;&gt;AsyncExpiringLazy&lt;/a&gt;, which can be used for managing lazy-resolved values that expire and must be refreshed - such as for example access tokens to web APIs.&lt;/p&gt;
&lt;p&gt;Yesterday I pushed out a release 2.1.0 of the library, which features a unique new feature - built thanks to the great work of &lt;a href=&#34;https://twitter.com/lukaszpyrzyk&#34;&gt;Lukasz&lt;/a&gt; - some new additional semantics for the way how the captured value gets refreshed.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 1.0.0 released – with support for .NET 5.0 and C# 9</title>
      <link>https://www.strathweb.com/2020/11/dotnet-script-1-0-0-released-with-support-for-net-5-0-and-c-9/</link>
      <pubDate>Wed, 11 Nov 2020 19:14:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/11/dotnet-script-1-0-0-released-with-support-for-net-5-0-and-c-9/</guid>
      <description>&lt;p&gt;To celebrate the release of &lt;a href=&#34;https://devblogs.microsoft.com/dotnet/announcing-net-5-0/&#34;&gt;.NET 5.0&lt;/a&gt;, which happened yesterday, we are happy to announce the release of &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt; - with support for .NET 5.0 and C# 9.&lt;/p&gt;
&lt;p&gt;In addition to that, we have decided that after such a long time since we started this project off, and a rather stable public API, it is high time to celebrate this .NET 5.0 release by additionally moving dotnet-script to version 1.0.0.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Beautiful and compact Web APIs with C# 9, .NET 5.0 and ASP.NET Core</title>
      <link>https://www.strathweb.com/2020/10/beautiful-and-compact-web-apis-with-c-9-net-5-0-and-asp-net-core/</link>
      <pubDate>Fri, 23 Oct 2020 05:52:45 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/10/beautiful-and-compact-web-apis-with-c-9-net-5-0-and-asp-net-core/</guid>
      <description>&lt;p&gt;Almost fours year ago &lt;a href=&#34;https://www.strathweb.com/2017/01/building-microservices-with-asp-net-core-without-mvc/&#34;&gt;I blogged&lt;/a&gt; about building lightweight microservices with ASP.NET Core 1.2 (which actually never shipped in such version and later became ASP.NET Core 2.0). The idea there was to drop the notion of bloated MVC controllers, get rid of as much as we can of the usual verbosity of C# based applications, and use a set of simple extension methods and a few cutting edge features of ASP.NET Core to provide a node.js style experience for authoring Web APIs.&lt;/p&gt;
&lt;p&gt;The article and the accompanying demo projects received quite a lot of attention, and I even got a chance to speak at some conference about these type of approaches to building focused, small microservices. With the .NET 5.0 in sight (.NET 5.0 RC2 is out at the time of writing this), and some remarkable features of C# 9, this &amp;ldquo;lightweight Web APIs&amp;rdquo; concept deserves a revisit, and this is what we will do in this blog post.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Semantic highlighting in OmniSharp and C# extension for VS Code</title>
      <link>https://www.strathweb.com/2020/06/semantic-highlighting-in-omnisharp-and-c-extension-for-vs-code/</link>
      <pubDate>Wed, 17 Jun 2020 08:07:16 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/06/semantic-highlighting-in-omnisharp-and-c-extension-for-vs-code/</guid>
      <description>&lt;p&gt;Two days ago &lt;a href=&#34;https://www.strathweb.com/2020/06/c-semantic-classification-with-roslyn/&#34;&gt;I blogged&lt;/a&gt; about doing semantic classification of C# code using Roslyn. Today, I wanted to draw your attention to a new feature we have recently shipped in OmniSharp and which is now available as experimental feature in C# extension for VS Code, and that&amp;rsquo;s improved OmniSharp semantic highlighting.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>C# semantic classification with Roslyn</title>
      <link>https://www.strathweb.com/2020/06/c-semantic-classification-with-roslyn/</link>
      <pubDate>Mon, 15 Jun 2020 16:21:40 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/06/c-semantic-classification-with-roslyn/</guid>
      <description>&lt;p&gt;A while ago, I blogged about &lt;a href=&#34;https://www.strathweb.com/2018/12/using-roslyn-c-completion-service-programmatically/&#34;&gt;using Roslyn&amp;rsquo;s completion service&lt;/a&gt;. In today&amp;rsquo;s post, I wanted to continue looking at some of the excellent compiler features that can be utilized to build IDE-like features in your projects. This time, we will look at how to do semantic classification of the code using Roslyn.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Decompilation support in OmniSharp and C# Extension for VS Code</title>
      <link>https://www.strathweb.com/2020/05/decompilation-support-in-omnisharp-and-c-extension-for-vs-code/</link>
      <pubDate>Thu, 07 May 2020 19:26:44 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/05/decompilation-support-in-omnisharp-and-c-extension-for-vs-code/</guid>
      <description>&lt;p&gt;One of the nice new features that we shipped in OmniSharp recently, and that has already made its way into the C# Extension for VS Code is &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn/pull/1751&#34;&gt;support for decompilation&lt;/a&gt;. It was released in April as part of &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn/blob/master/CHANGELOG.md#1350---2020-04-10&#34;&gt;1.35.0&lt;/a&gt; release of OmniSharp. Let&amp;rsquo;s have a quick look at how you can get it up and running.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Runtime Host Configuration Options and AppContext data in .NET Core</title>
      <link>https://www.strathweb.com/2019/12/runtime-host-configuration-options-and-appcontext-data-in-net-core/</link>
      <pubDate>Fri, 06 Dec 2019 15:26:20 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/12/runtime-host-configuration-options-and-appcontext-data-in-net-core/</guid>
      <description>&lt;p&gt;One of the little known and rarely used hidden features of .NET Core is the ability to seed &lt;em&gt;AppContext&lt;/em&gt; data dictionary directly from the &lt;em&gt;csproj&lt;/em&gt; project file. This provides an interesting mechanism for exposing low-level tweaks/knobs/settings for your application code.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using async disposable and async enumerable in frameworks older than .NET Core 3.0</title>
      <link>https://www.strathweb.com/2019/11/using-async-disposable-and-async-enumerable-in-frameworks-older-than-net-core-3-0/</link>
      <pubDate>Tue, 19 Nov 2019 13:06:46 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/11/using-async-disposable-and-async-enumerable-in-frameworks-older-than-net-core-3-0/</guid>
      <description>&lt;p&gt;One of the awesome features introduced in .NET Core 3.0 and C# 8.0 are &lt;a href=&#34;https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-8.0/async-streams&#34;&gt;async streams&lt;/a&gt;. The feature consists of two parts - async disposable, for async clean up, as well as async enumerable, for async iteration.&lt;/p&gt;
&lt;p&gt;Normally, the C# language features are backwards compatible and can be used regardless of the runtime framework being targeted. In this particular case, however, the newly introduced types that are needed for async streams feature to work, such as for example &lt;em&gt;IAsyncDisposable&lt;/em&gt; or &lt;em&gt;IAsyncEnumerator&lt;T&gt;&lt;/em&gt;, were only added in .NET Core 3.0, restricting the usage of the features to that runtime, and later.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how you can still benefit from async disposable and async enumerable on older frameworks.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Instantiating an object without using its constructor in C#</title>
      <link>https://www.strathweb.com/2019/11/instantiating-an-object-without-using-constructor-in-c/</link>
      <pubDate>Thu, 14 Nov 2019 14:57:11 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/11/instantiating-an-object-without-using-constructor-in-c/</guid>
      <description>&lt;p&gt;In this blog post we will look at how you could create an instance of an object in C# without calling its constructor - which sounds a bit crazy, but is actually something that has been supported by both CLR and Core CLR for a long time now.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>“Implementing” a non-public interface in .NET Core with DispatchProxy</title>
      <link>https://www.strathweb.com/2019/09/implementing-a-non-public-interface-in-net-core-with-dispatchproxy/</link>
      <pubDate>Wed, 18 Sep 2019 14:59:00 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/09/implementing-a-non-public-interface-in-net-core-with-dispatchproxy/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/dotnet/framework/reflection-and-codedom/reflection&#34;&gt;Reflection&lt;/a&gt; is a tremendously powerful concept in .NET, which every C# developer, sooner or later, ends up working with. It is very useful for a lot of perfectly honest scenarios such as for example assembly scanning, type discovery or all kinds of application composability features.&lt;/p&gt;
&lt;p&gt;However, it can also be used to circumvent the public API surface of the dependencies you consume - to modify them or gain access to things that the author of your dependency didn&amp;rsquo;t exactly envision. That said, this process of &amp;ldquo;hacking around&amp;rdquo; is very typical for C# development world and, albeit somewhat risky, it sometimes might be the only way out of a coding jam you are in.&lt;/p&gt;
&lt;p&gt;Things start to get interesting if you are forced to implement a non-public (for example &lt;em&gt;internal&lt;/em&gt;) interface. At that point, the &amp;ldquo;basic&amp;rdquo; reflection can&amp;rsquo;t help anymore, so let&amp;rsquo;s have a look at how we can do it.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>EditorConfig support in OmniSharp and C# extension VS Code</title>
      <link>https://www.strathweb.com/2019/07/editorconfig-support-in-omnisharp-and-c-extension-vs-code/</link>
      <pubDate>Thu, 25 Jul 2019 10:33:17 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/07/editorconfig-support-in-omnisharp-and-c-extension-vs-code/</guid>
      <description>&lt;p&gt;Recently, I blogged about Roslyn &lt;a href=&#34;https://www.strathweb.com/2019/04/roslyn-analyzers-in-code-fixes-in-omnisharp-and-vs-code/&#34;&gt;analyzers support in OmniSharp and C# extension VS Code&lt;/a&gt; and some background on how that feature came together.&lt;/p&gt;
&lt;p&gt;Today I am pleased to announce that in the latest OmniSharp release - &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn/blob/master/CHANGELOG.md#1330---2019-07-01&#34;&gt;1.33.0&lt;/a&gt;, where we have shipped another large feature (in fact, the 2nd most requested feature in OmniSharp repo, after, well, analyzers) and that is support for &lt;a href=&#34;https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference?view=vs-2019&#34;&gt;EditorConfig&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Between then, and the time it took me to finally write this post, we actually have &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn/blob/master/CHANGELOG.md#1340---2019-07-15&#34;&gt;1.34.0&lt;/a&gt; which is even better - and is in fact included in the corresponding release &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.21.0&#34;&gt;1.21.0&lt;/a&gt; of the C# extension for VS Code.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building a C# Interactive shell in a browser with Blazor (WebAssembly) and Roslyn</title>
      <link>https://www.strathweb.com/2019/06/building-a-c-interactive-shell-in-a-browser-with-blazor-webassembly-and-roslyn/</link>
      <pubDate>Fri, 07 Jun 2019 14:52:38 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/06/building-a-c-interactive-shell-in-a-browser-with-blazor-webassembly-and-roslyn/</guid>
      <description>&lt;p&gt;In this post I wanted to show you how to write and embed a C# interactive shell (a REPL - read-evaluate-print-loop) in a browser, on top of WebAssembly.&lt;/p&gt;
&lt;p&gt;The REPL will give you fully fledged C# interactive development playground, while still being completely sandboxed in the browser environment. I originally wrote this example for my session at Dotnet Cologne on May 10 this year.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Collectible assemblies in .NET Core 3.0</title>
      <link>https://www.strathweb.com/2019/01/collectible-assemblies-in-net-core-3-0/</link>
      <pubDate>Wed, 09 Jan 2019 22:16:39 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/01/collectible-assemblies-in-net-core-3-0/</guid>
      <description>&lt;p&gt;Since the beginning of .NET Core, the one feature that I have been most anxiously waiting for, has been support for collectible assemblies. It took a while (a while!), but finally, in .NET Core 3.0 (at the time of writing &lt;em&gt;3.0.0-preview-27122-01&lt;/em&gt; from 2018-12-04), it&amp;rsquo;s here.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s going to be a killer functionality, that will support some excellent use cases in .NET Core - especially around application plugins, extensibility and dynamic assembly generation.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a quick look at how we can load and unload assemblies in .NET Core.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using Roslyn C# Completion Service programmatically</title>
      <link>https://www.strathweb.com/2018/12/using-roslyn-c-completion-service-programmatically/</link>
      <pubDate>Wed, 05 Dec 2018 20:23:48 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/12/using-roslyn-c-completion-service-programmatically/</guid>
      <description>&lt;p&gt;I am involved in a few open source projects built around the &lt;a href=&#34;https://github.com/dotnet/roslyn&#34;&gt;Roslyn&lt;/a&gt; compiler. One of those projects is &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn&#34;&gt;OmniSharp&lt;/a&gt;, which brings intellisense and C# language services to a number of editors out there, allowing them to provide for their users a rich C# code authoring experience.&lt;/p&gt;
&lt;p&gt;Which actually brings me to the point of today&amp;rsquo;s post. Roslyn is a compiler-as-a-service that you can embed in your own app, and when you do that, you could reach into its C# language services (more specifically, &lt;em&gt;CompletionService&lt;/em&gt;) and easily build your own C# intellisense engine.&lt;/p&gt;
&lt;p&gt;However, this is not really documented, so I wanted to use this post to show you how you can get started with that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>No InternalsVisibleTo, no problem – bypassing C# visibility rules with Roslyn</title>
      <link>https://www.strathweb.com/2018/10/no-internalvisibleto-no-problem-bypassing-c-visibility-rules-with-roslyn/</link>
      <pubDate>Mon, 08 Oct 2018 19:26:35 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/10/no-internalvisibleto-no-problem-bypassing-c-visibility-rules-with-roslyn/</guid>
      <description>&lt;p&gt;Both the C# compiler and the CLR/CoreCLR runtimes contain a bunch of rules that are in place to save us from ourselves (and to allow us to write code without needing to fully understand ECMA-334 C# Language Specification). That said, there are times where we want to do some things that are normally not allowed, and a good example of that is reaching into reflection to execute some private or internal code.&lt;/p&gt;
&lt;p&gt;Today I wanted to show you how to do something quite cool - how to bypass the type/member visibility rules using the Roslyn compiler. In other words, how to get access to internal and private members without needing to use reflection or something like &lt;em&gt;InternalsVisibleToAttribute&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script – now on .NET Core 2.1 runtime, with C# 7.3 support and more!</title>
      <link>https://www.strathweb.com/2018/05/dotnet-script-now-on-net-core-2-1-runtime-with-c-7-3-support-and-more/</link>
      <pubDate>Mon, 07 May 2018 10:24:27 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/05/dotnet-script-now-on-net-core-2-1-runtime-with-c-7-3-support-and-more/</guid>
      <description>&lt;p&gt;In the &lt;a href=&#34;https://www.strathweb.com/2018/04/dotnet-script-now-available-as-net-core-sdk-2-1-global-tool/&#34;&gt;previous post&lt;/a&gt;, I announced that &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt; is now built as global tool and can be installed using .NET Core 2.1 preview SDK. However, by that time it was still based on .NET Core 2.0 runtime (it was possible to build and install .NET Core 2.0 tools using .NET Core 2.1 preview SDK).&lt;/p&gt;
&lt;p&gt;Now we have even more cool news to announce - because dotnet-script is now a true .NET Core 2.1 application, and can be used to run scripts on top of .NET Core 2.1 runtime. We release quite often so let me do a quick rundown of all the new features since my last blog post.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Easy way to create a C# lambda expression from a string (with Roslyn)</title>
      <link>https://www.strathweb.com/2018/01/easy-way-to-create-a-c-lambda-expression-from-a-string-with-roslyn/</link>
      <pubDate>Mon, 29 Jan 2018 13:51:02 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/01/easy-way-to-create-a-c-lambda-expression-from-a-string-with-roslyn/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve worked on quite a lot of projects over the years, with many different teams, and one of the questions that keeps coming back to me over and over with a high degree of regularity is how to load a C# lambda from a string - for example from a configuration file.&lt;/p&gt;
&lt;p&gt;This is not surprising, because being able to do that can give you a tremendous amount of flexibility in your code, as it would (for the lack of better word) unlock the possibility to alter business logic from the configuration level, without having to recompile and redeploy your application.&lt;/p&gt;
&lt;p&gt;Historically, this has been possible but also quite a painful task. Today I wanted to show you a remarkably simple solution to this problem - with the help of the Roslyn compiler Nuget packages.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>C# REPL for .NET Core 2.0 and #load support from Nuget – dotnet-script 0.16 is out!</title>
      <link>https://www.strathweb.com/2017/12/c-repl-for-net-core-2-0-and-load-support-from-nuget-0-16-dotnet-script-is-out/</link>
      <pubDate>Mon, 04 Dec 2017 14:46:45 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/12/c-repl-for-net-core-2-0-and-load-support-from-nuget-0-16-dotnet-script-is-out/</guid>
      <description>&lt;p&gt;Last week, together with [Bernhard][1] we released version [0.16 of dotnet-script][2], the .NET Core 2.0 C# script runner. I&amp;rsquo;d like to summarize the new features in this short blog post - as there are two highlights of this release - which we are very excited about!&lt;/p&gt;
&lt;p&gt;The project now offers a C# REPL (interactive mode) which can be access when launching &lt;em&gt;dotnet-script&lt;/em&gt; without any arguments. All the features of scripting are supported in the interactive mode, including support for adding Nuget references via &lt;em&gt;#r &amp;ldquo;nuget: {package}&amp;rdquo;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The second large feature is support for &lt;em&gt;#load &amp;ldquo;nuget: {package}&amp;rdquo;&lt;/em&gt;, which works similar to its &lt;em&gt;#r&lt;/em&gt; counterpart, except not for assemblies but for referencing CSX files from Nuget.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>C# Script Runner for .NET Core 2.0!</title>
      <link>https://www.strathweb.com/2017/11/c-script-runner-for-net-core-2-0/</link>
      <pubDate>Thu, 02 Nov 2017 13:12:31 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/11/c-script-runner-for-net-core-2-0/</guid>
      <description>&lt;p&gt;As you &lt;a href=&#34;https://www.strathweb.com/2017/08/dotnet-script-0-11-out-with-inline-nuget-support/&#34;&gt;may have read&lt;/a&gt; on this blog before, together with &lt;a href=&#34;https://twitter.com/bernhardrichter&#34;&gt;Bernhard&lt;/a&gt;, we have been working on a .NET Core and .NET CLI C# script runner, called &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt;, for a while now. Today I have a big announcement to make - we have recently released .NET Core 2.0 and .NET Standard 2.0 support!&lt;/p&gt;
&lt;p&gt;These changes are part of &lt;a href=&#34;https://github.com/filipw/dotnet-script/releases/tag/0.14.0&#34;&gt;0.14.0&lt;/a&gt; release that came out 3 weeks ago. We didn&amp;rsquo;t want to promote it that much, because - as it&amp;rsquo;s normally the case with .NET Core related stuff - the accompanying tooling wasn&amp;rsquo;t ready. In other words, there was no robust language services or intellisense story for writing .NET Core 2.0 scripts.&lt;/p&gt;
&lt;p&gt;However, we are now ready with OmniSharp tooling too, which means you can enjoy C# scripting on .NET Core 2.0 in VS Code as long as you install the latest &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.13.0-beta4&#34;&gt;beta&lt;/a&gt; release of C# for VS Code. In parallel, we also already released a &lt;a href=&#34;https://github.com/filipw/dotnet-script/releases/tag/0.15.0&#34;&gt;0.15.0&lt;/a&gt; version of dotnet-script.&lt;/p&gt;
&lt;p&gt;Here is how to get started and a summary of what is new in 0.14.0 and 0.15.0.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Customizing query string parameter binding in ASP.NET Core MVC</title>
      <link>https://www.strathweb.com/2017/07/customizing-query-string-parameter-binding-in-asp-net-core-mvc/</link>
      <pubDate>Fri, 21 Jul 2017 13:55:42 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/07/customizing-query-string-parameter-binding-in-asp-net-core-mvc/</guid>
      <description>&lt;p&gt;A few years ago I blogged about &lt;a href=&#34;https://www.strathweb.com/2013/04/asp-net-web-api-parameter-binding-part-1-understanding-binding-from-uri/&#34;&gt;binding parameters from URI&lt;/a&gt; in ASP.NET Web API. One of the examples in that post was how to bind a comma-separated collection passed to your API as a query string parameter.&lt;/p&gt;
&lt;p&gt;Technologies change, and we now work with ASP.NET Core (and the MVC Core framework), but problems remain the same - so let&amp;rsquo;s have a look at how we can customize the way parameters are bound from query string in ASP.NET Core MVC.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Resolving ASP.NET Core Startup class from the DI container</title>
      <link>https://www.strathweb.com/2017/06/resolving-asp-net-core-startup-class-from-the-di-container/</link>
      <pubDate>Tue, 13 Jun 2017 13:35:36 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/06/resolving-asp-net-core-startup-class-from-the-di-container/</guid>
      <description>&lt;p&gt;In ASP.NET Core, the most common setup is characterized by having a standalone &lt;em&gt;Startup&lt;/em&gt; class, responsible for bootstrapping the services needed by your application, as well as setting up the application pipeline.&lt;/p&gt;
&lt;p&gt;What most users of ASP.NET Core do not realize, is that at runtime, the &lt;em&gt;Startup&lt;/em&gt; instance is actually being resolved from the DI container. This allows you to control some interesting aspects of how your application is bootstrapped, which can be really important i.e. in integration testing scenarios.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>C# code formatting settings in VS Code and OmniSharp</title>
      <link>https://www.strathweb.com/2017/01/c-code-formatting-settings-in-vs-code-and-omnisharp/</link>
      <pubDate>Mon, 16 Jan 2017 14:55:55 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/01/c-code-formatting-settings-in-vs-code-and-omnisharp/</guid>
      <description>&lt;p&gt;I quite often get or see questions about configuring C# code formatting settings for Visual Studio Code.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn&#34;&gt;OmniSharp&lt;/a&gt; (the open source Roslyn-based technology that powers C# language services) in VS Code exposes a rich set of code formatting settings which you can use to tailor and customize your C# experience.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how you can use them.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Writing C# build scripts with FAKE, OmniSharp and VS Code</title>
      <link>https://www.strathweb.com/2016/12/writing-c-build-scripts-with-fake-omnisharp-and-vs-code/</link>
      <pubDate>Sun, 04 Dec 2016 11:28:47 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/12/writing-c-build-scripts-with-fake-omnisharp-and-vs-code/</guid>
      <description>&lt;p&gt;In this blog post I&amp;rsquo;d like to show an extremely - in my opinion - productive way of writing build scripts using C#. As a basis, we&amp;rsquo;ll use the excellent core FAKE library called &lt;a href=&#34;https://www.nuget.org/packages/FAKE.Lib/&#34;&gt;FakeLib&lt;/a&gt;, which is written F# and consume it in C# scripts.&lt;/p&gt;
&lt;p&gt;Sure, there are other projects/task runners like &lt;a href=&#34;https://github.com/cake-build/cake&#34;&gt;Cake&lt;/a&gt; or &lt;a href=&#34;https://github.com/bau-build/bau&#34;&gt;Bau&lt;/a&gt; that allow you to write C# build scripts (few more actually out there) but the approach I&amp;rsquo;d like to show you today, is I think the most productive of all, so bear with me.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Announcing ConfigR 1.0</title>
      <link>https://www.strathweb.com/2016/11/announcing-configr-1-0/</link>
      <pubDate>Mon, 14 Nov 2016 18:47:52 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/11/announcing-configr-1-0/</guid>
      <description>&lt;p&gt;Recently we released version 1.0 of &lt;a href=&#34;https://github.com/config-r/config-r&#34;&gt;ConfigR&lt;/a&gt; - a popular .NET configuration library, that lets you configure your application via C# scripts (CSX).&lt;/p&gt;
&lt;p&gt;This is also the last release requiring full .NET 4.5/Mono - the next version of &lt;a href=&#34;https://github.com/config-r/config-r&#34;&gt;ConfigR&lt;/a&gt; is going to be a &lt;em&gt;netstandard&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a overview of the features that are there in 1.0!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Lazy async initialization for expiring objects</title>
      <link>https://www.strathweb.com/2016/11/lazy-async-initialization-for-expiring-objects/</link>
      <pubDate>Tue, 01 Nov 2016 19:53:26 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/11/lazy-async-initialization-for-expiring-objects/</guid>
      <description>&lt;p&gt;Today I wanted to share something I found myself using quite a lot recently, and that is not supported out of the box by the .NET framework.&lt;/p&gt;
&lt;p&gt;So, as part of the framework, we have &lt;a href=&#34;https://msdn.microsoft.com/en-us/library/dd642331%28v=vs.110%29.aspx?f=255&amp;amp;MSPPError=-2147217396&#34;&gt;Lazy&lt;T&gt;&lt;/a&gt;, which provides out of the box support for deferring the creation of a large or resource-intensive objects.&lt;/p&gt;
&lt;p&gt;However, what if the object requires async operation to be created, and what if its value expires after some time, and it needs to be recomputed? Let&amp;rsquo;s have a look at how to solve this.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Strongly typed configuration in ASP.NET Core without IOptions&lt;T&gt;</title>
      <link>https://www.strathweb.com/2016/09/strongly-typed-configuration-in-asp-net-core-without-ioptionst/</link>
      <pubDate>Thu, 29 Sep 2016 09:31:16 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/09/strongly-typed-configuration-in-asp-net-core-without-ioptionst/</guid>
      <description>&lt;p&gt;There are several great resources on the Internet about using the new &lt;a href=&#34;https://github.com/aspnet/Configuration&#34;&gt;Configuration&lt;/a&gt; and &lt;a href=&#34;https://github.com/aspnet/Options&#34;&gt;Options&lt;/a&gt; framework of ASP.NET Core - like this comprehensive post by &lt;a href=&#34;https://weblog.west-wind.com/posts/2016/may/23/strongly-typed-configuration-settings-in-aspnet-core&#34;&gt;Rick Strahl&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Using strongly typed configuration is without a question a great convenience and productivity boost for the developers; but what I wanted to show you today is how to bind &lt;em&gt;IConfiguration&lt;/em&gt; directly to your POCO object - so that you can inject it directly into the dependent classes without wrapping into &lt;em&gt;IOptions&lt;T&gt;&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Inheriting route attributes in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2016/06/inheriting-route-attributes-in-asp-net-web-api/</link>
      <pubDate>Sun, 26 Jun 2016 18:33:35 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/06/inheriting-route-attributes-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;I was recently working on a project, where I had a need to inherit routes from a generic base Web API controller. This is not supported by Web API out of the box, but can be enabled with a tiny configuration tweak. Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Global route prefix in ASP.NET Core MVC (revisited)</title>
      <link>https://www.strathweb.com/2016/06/global-route-prefix-with-asp-net-core-mvc-revisited/</link>
      <pubDate>Thu, 09 Jun 2016 07:16:51 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/06/global-route-prefix-with-asp-net-core-mvc-revisited/</guid>
      <description>&lt;p&gt;A couple of months ago &lt;a href=&#34;https://www.strathweb.com/2015/10/global-route-prefixes-with-attribute-routing-in-asp-net-5-and-mvc-6/&#34;&gt;I blogged about adding a feature&lt;/a&gt; to ASP.NET Core MVC (or ASP.NET 5 at the time) that will allow you to set central route prefix(es) to your attribute routing mechanism.&lt;/p&gt;
&lt;p&gt;That solution was written against &lt;em&gt;beta8&lt;/em&gt; version of ASP.NET Core and since now we are at RC2 - it doesn&amp;rsquo;t (surprise, surprise) work anymore.&lt;/p&gt;
&lt;p&gt;Here is the updated version.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introducing Strathweb TypedRouting for ASP.NET MVC Core</title>
      <link>https://www.strathweb.com/2016/06/introducing-strathweb-typedrouting-for-asp-net-mvc-core/</link>
      <pubDate>Fri, 03 Jun 2016 06:50:06 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/06/introducing-strathweb-typedrouting-for-asp-net-mvc-core/</guid>
      <description>&lt;p&gt;One of the side projects I created for Web API a while ago was &lt;a href=&#34;https://github.com/filipw/Strathweb.TypedRouting&#34;&gt;Strathweb.TypeRouting&lt;/a&gt; - a little library built on top of the attribute routing extensibility points, that allowed you to declare Web API routes centrally, in a strongly typed way (as opposed to the built in, anonymous object approach).&lt;/p&gt;
&lt;p&gt;Then, some time ago, I &lt;a href=&#34;https://www.strathweb.com/2015/03/strongly-typed-routing-asp-net-mvc-6-iapplicationmodelconvention/&#34;&gt;blogged&lt;/a&gt; about how you would achieve the same thing in ASP.NET Core. A bunch of things have changed since then - the original post was written against beta6 of the framework I believe.&lt;/p&gt;
&lt;p&gt;Last week, I set up the code on &lt;a href=&#34;https://github.com/filipw/Strathweb.TypedRouting.AspNetCore&#34;&gt;Github&lt;/a&gt;, migrated everything to RC2 and released on &lt;a href=&#34;https://www.nuget.org/packages/Strathweb.TypedRouting.AspNetCore&#34;&gt;NuGet&lt;/a&gt; for everyone to use.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running multiple ASP.NET Web API pipelines side by side</title>
      <link>https://www.strathweb.com/2016/05/running-multiple-asp-net-web-api-pipelines-side-by-side/</link>
      <pubDate>Wed, 25 May 2016 07:01:27 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/05/running-multiple-asp-net-web-api-pipelines-side-by-side/</guid>
      <description>&lt;p&gt;Over the past 4 years or so, I have worked on many Web API projects, for a lot of different clients, and I thought I have seen almost everything.&lt;/p&gt;
&lt;p&gt;Last week I came across an interesting new (well, at least to me) scenario though - with the requirement to run two Web API pipelines side by side, in the same process. Imagine having &lt;em&gt;/api&lt;/em&gt; as one Web API &amp;ldquo;instance&amp;rdquo;, and then having &lt;em&gt;/dashboard&lt;/em&gt; as completely separate one, with it&amp;rsquo;s own completely custom configuration (such as formatter settings, authentication or exception handling). And all of that running in the same process.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>IP Filtering in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2016/05/ip-filtering-in-asp-net-web-api/</link>
      <pubDate>Fri, 13 May 2016 15:57:13 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/05/ip-filtering-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;One of the functionalities I had to use fairly often on different ASP.NET Web API projects that I was involved in in the past was IP filtering - restricting access to the whole API, or to parts of it, based on the caller&amp;rsquo;s IP address.&lt;/p&gt;
&lt;p&gt;I thought it might be useful to share this here. More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building strongly typed application configuration utility with Roslyn</title>
      <link>https://www.strathweb.com/2016/04/building-strongly-typed-application-configuration-utility-with-roslyn/</link>
      <pubDate>Mon, 25 Apr 2016 20:02:55 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/04/building-strongly-typed-application-configuration-utility-with-roslyn/</guid>
      <description>&lt;p&gt;In this post we will have a look at how, with just several lines of Roslyn code, you can build an extremely cool and powerful utility - a library allowing you to provide configuration for your application as a strongly typed C# script file.&lt;/p&gt;
&lt;p&gt;This post was inspired by the &lt;a href=&#34;https://github.com/config-r/config-r&#34;&gt;ConfigR&lt;/a&gt; library, which provides this type of functionality through scriptcs (I also blogged about ConfigR &lt;a href=&#34;https://www.strathweb.com/2014/10/using-configr-configuration-source-asp-net-vnext/&#34;&gt;before&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;We will, however, deal with marshalling configuration data between the C# configuration and the parent app differently than ConfigR does.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Request.IsLocal in ASP.NET Core</title>
      <link>https://www.strathweb.com/2016/04/request-islocal-in-asp-net-core/</link>
      <pubDate>Fri, 15 Apr 2016 12:44:03 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/04/request-islocal-in-asp-net-core/</guid>
      <description>&lt;p&gt;In the &amp;ldquo;classic&amp;rdquo; ASP.NET, &lt;em&gt;System.Web.HttpRequest&lt;/em&gt; gave us a fairly useful &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/system.web.httprequest.islocal.aspx&#34;&gt;IsLocal&lt;/a&gt; property which developers used to identify local requests.&lt;/p&gt;
&lt;p&gt;It returned &lt;strong&gt;true&lt;/strong&gt; if the IP address of the request originator was 127.0.0.1 or if the IP address of the request was the same as the server&amp;rsquo;s IP address.&lt;/p&gt;
&lt;p&gt;ASP.NET Core RC1 exposed similar type of information on its &lt;em&gt;ConnectionInfo&lt;/em&gt; object (hanging off &lt;em&gt;HttpContext&lt;/em&gt;) and via an &lt;em&gt;IHttpConnectionFeature&lt;/em&gt;. However, this is being removed in RC2.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see how you can quickly add it back as extension method, so that you can use it going forward.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Predefined Namespaces And Custom Base View Page in ASP.NET Core 1.0 MVC</title>
      <link>https://www.strathweb.com/2016/04/predefined-namespaces-and-custom-base-view-page-in-asp-net-core-1-0-mvc/</link>
      <pubDate>Fri, 08 Apr 2016 00:06:44 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/04/predefined-namespaces-and-custom-base-view-page-in-asp-net-core-1-0-mvc/</guid>
      <description>&lt;p&gt;It is quite common to predefine some namespaces to be available in the context of your Razor view files in ASP.NET MVC. In MVC 5, it was done inside the &lt;em&gt;web.config&lt;/em&gt; file - not the &amp;ldquo;main&amp;rdquo; application one, but the one residing inside your &lt;em&gt;Views&lt;/em&gt; folder.&lt;/p&gt;
&lt;p&gt;Additionally, the same file was used to define the &lt;em&gt;pageBaseType&lt;/em&gt; for your Razor views. This way you could expose extra members or behaviors to your pages, such as injected services or common configuration objects.&lt;/p&gt;
&lt;p&gt;Since there is no more &lt;em&gt;web.config&lt;/em&gt; in ASP.NET Core 1.0 MVC, let&amp;rsquo;s have a look at how to achieve the same in the next generation ASP.NET.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Enabling C# 7 Features in Visual Studio “15” Preview</title>
      <link>https://www.strathweb.com/2016/03/enabling-c-7-features-in-visual-studio-15-preview/</link>
      <pubDate>Thu, 31 Mar 2016 02:16:25 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/03/enabling-c-7-features-in-visual-studio-15-preview/</guid>
      <description>&lt;p&gt;Yesterday, at Build, Microsoft released the &lt;a href=&#34;https://www.visualstudio.com/news/vs15-preview-vs&#34;&gt;first public preview of Visual Studio &amp;ldquo;15&amp;rdquo;&lt;/a&gt; - the next iteration of Visual Studio.&lt;/p&gt;
&lt;p&gt;One of the main reasons why you&amp;rsquo;d want to try it out already is to be able to use some of the heralded C# 7 features - such as binary literals, local functions or pattern matching (to name just a few).&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s been possible to test out these features in a slightly hacky way before (&lt;a href=&#34;https://joshvarty.wordpress.com/2016/02/10/lrn-quick-tip-how-to-test-out-c-7-features-with-roslyn/&#34;&gt;see Josh&amp;rsquo;s post&lt;/a&gt;) - by building Roslyn from source and deploying it into VS using the CompilerExtension VSIX, but of course it&amp;rsquo;s much easier and convenient to just use C# 7 features directly in VS &amp;ldquo;15&amp;rdquo; now.&lt;/p&gt;
&lt;p&gt;In this post I&amp;rsquo;m gonna show you how to enable the experimental C# 7 features - because they are by default not available.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>The Subtle Perils of Controller Dependency Injection in ASP.NET Core MVC</title>
      <link>https://www.strathweb.com/2016/03/the-subtle-perils-of-controller-dependency-injection-in-asp-net-core-mvc/</link>
      <pubDate>Mon, 28 Mar 2016 17:18:28 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/03/the-subtle-perils-of-controller-dependency-injection-in-asp-net-core-mvc/</guid>
      <description>&lt;p&gt;Some time ago I wrote a blog about &lt;a href=&#34;https://www.strathweb.com/2015/04/asp-net-mvc-6-discovers-controllers/&#34;&gt;how ASP.NET MVC 6 discovers controllers&lt;/a&gt;. While a lot has change since then, including the name - now the framework being called ASP.NET Core MVC, the post is still valid and the processes described there haven&amp;rsquo;t really changed.&lt;/p&gt;
&lt;p&gt;That said, there is one extra thing that should be added to it, and that is how external dependency injection containers relate to the process of controller discovery and instantiation, as there is a subtle difference between ASP.NET Core MVC and the &amp;ldquo;classic&amp;rdquo; frameworks - MVC 5 or Web API 2. This post is really sparked by the conversation on Twitter &lt;a href=&#34;https://twitter.com/jeremydmiller/status/712621955468275712&#34;&gt;with Jeremy and Kristian&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Roslyn scripting on CoreCLR (.NET CLI and DNX) and in memory assemblies</title>
      <link>https://www.strathweb.com/2016/03/roslyn-scripting-on-coreclr-net-cli-and-dnx-and-in-memory-assemblies/</link>
      <pubDate>Thu, 10 Mar 2016 17:46:22 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/03/roslyn-scripting-on-coreclr-net-cli-and-dnx-and-in-memory-assemblies/</guid>
      <description>&lt;p&gt;For a while now, the Roslyn C# scripting APIs (&lt;a href=&#34;https://www.nuget.org/packages/Microsoft.CodeAnalysis.CSharp.Scripting&#34;&gt;Microsoft.CodeAnalysis.CSharp.Scripting&lt;/a&gt;) have been portable, and supported cross platform usage.&lt;/p&gt;
&lt;p&gt;However, I recently ran into a few difficulties regarding using the Roslyn Scripting APIs in .NET CLI (which is replacing DNX) context. The solution was to use a lower level unmanaged CoreCLR API - and since they it’s not that well documented, I thought it would be beneficial to document it in a blog post.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>OmniSharp Canada Tour 2016</title>
      <link>https://www.strathweb.com/2016/02/omnisharp-canada-tour-2016/</link>
      <pubDate>Thu, 18 Feb 2016 04:04:35 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/02/omnisharp-canada-tour-2016/</guid>
      <description>I&amp;rsquo;ve said it a couple of times already, but I sincerely believe that the OmniSharp project is one of the most important projects in the history of .NET.
Having an alternative to the &amp;ldquo;dictatorship&amp;rdquo; of Visual Studio is fundamentally important to the health of the .NET ecosystem, and OmniSharp has done a tremendous job in that sense (thanks, Jason &amp;amp; David). Fro my side, I&amp;rsquo;ve been trying to support the project as much as I can - by contributing, speaking or blogging about it, trying to spread the love.</description>
    </item>
    
    <item>
      <title>FormatFilter and MediaTypeMappings in ASP.NET Core 1.0 MVC</title>
      <link>https://www.strathweb.com/2016/02/formatfilter-and-mediatypemappings-in-asp-net-core-1-0-mvc/</link>
      <pubDate>Fri, 05 Feb 2016 20:13:34 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/02/formatfilter-and-mediatypemappings-in-asp-net-core-1-0-mvc/</guid>
      <description>&lt;p&gt;In the earlier posts, we looked at how &lt;a href=&#34;https://www.strathweb.com/2014/11/formatters-asp-net-mvc-6/&#34;&gt;formatters work in general&lt;/a&gt; in the upcoming MVC Core 1.0 (although at that time it was still being referred to as MVC 6) and how &lt;a href=&#34;https://www.strathweb.com/2015/04/asp-net-mvc-6-formatters-xml-browser-requests/&#34;&gt;XML formatters&lt;/a&gt; can be enabled in your ASP.NET Core application.&lt;/p&gt;
&lt;p&gt;This time around, I thought it would be interesting to follow up on that, and discuss another topic that should be very familiar to folks with ASP.NET Web API experience - &lt;em&gt;MediaTypeMappings&lt;/em&gt;. They were quite commonly used in Web API, and they have been ported over to MVC Core, and can be enabled via a &lt;em&gt;FormatFilter&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Re-using external view components in ASP.NET 5 &amp; ASP.NET MVC 6</title>
      <link>https://www.strathweb.com/2016/01/re-using-external-view-components-in-asp-net-5-asp-net-mvc-6/</link>
      <pubDate>Thu, 14 Jan 2016 22:37:12 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/01/re-using-external-view-components-in-asp-net-5-asp-net-mvc-6/</guid>
      <description>&lt;p&gt;The other day we [explored using view components in ASP.NET 5][1] - as a very nifty replacement for the old MVC ChildActions. View components allow you to package a piece of functionality into a reusable class, along with an accompanying view, that can be invoke from any other view on demand.&lt;/p&gt;
&lt;p&gt;Today let’s take this a step further - and let’s see how you can configure ASP.NET MVC 6, to be able to consume view components not just from the current web project but from external sources - external assemblies too. This way you will be able to share and distribute your view components across multiple projects. This is definitely useful for anyone who has - for example - ever worked on a portal-style applications, where building reusable components is one of the most important development activities.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Adding C# Scripting to Your Development Arsenal</title>
      <link>https://www.strathweb.com/2015/12/adding-c-scripting-to-your-development-arsenal/</link>
      <pubDate>Tue, 01 Dec 2015 17:44:51 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/12/adding-c-scripting-to-your-development-arsenal/</guid>
      <description>As part of my efforts to popularize C# scripting in the .NET community (which, hopefully, you have noticed by following this blog, my Twitter or my Github) and in celebration of the first stable release of Roslyn scripting packages on Nuget yesterday, I published a guest post at Canadian Developer Connection blog - Adding C# Scripting to Your Development Arsenal.
You can read the post here, and hopefully you find it useful.</description>
    </item>
    
    <item>
      <title>Running C# scripts and snippets in Visual Studio Code with scriptcs</title>
      <link>https://www.strathweb.com/2015/11/running-c-scripts-and-snippets-in-visual-studio-code-with-scriptcs/</link>
      <pubDate>Thu, 26 Nov 2015 04:50:28 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/11/running-c-scripts-and-snippets-in-visual-studio-code-with-scriptcs/</guid>
      <description>&lt;p&gt;Recently &lt;a href=&#34;https://github.com/microsoft/vscode&#34;&gt;Microsoft open sourced the Code editor&lt;/a&gt; and I think a lot of people would agree that it&amp;rsquo;s really awesome. The UI based on Electron and the Monaco editor previously used in &lt;a href=&#34;https://www.visualstudio.com/en-us/products/visual-studio-team-services-vs.aspx&#34;&gt;Visual Studio Online&lt;/a&gt; is really snappy and works great.&lt;/p&gt;
&lt;p&gt;Visual Studio Code can also now be extended via plugins - and when that was announced, I thought why not make something for scriptcs? There already is a scriptcs plugin for &lt;a href=&#34;https://github.com/scriptcs/scriptcs-sublime&#34;&gt;Sublime Text&lt;/a&gt; and for &lt;a href=&#34;https://atom.io/packages/atom-runner&#34;&gt;Atom&lt;/a&gt;, so it only makes sense to have one for Visual Studio Code.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Localized routes with ASP.NET 5 and MVC 6</title>
      <link>https://www.strathweb.com/2015/11/localized-routes-with-asp-net-5-and-mvc-6/</link>
      <pubDate>Fri, 13 Nov 2015 20:13:05 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/11/localized-routes-with-asp-net-5-and-mvc-6/</guid>
      <description>&lt;p&gt;In my &lt;a href=&#34;http://www.apress.com/9781430259800&#34;&gt;Web API book&lt;/a&gt;, in one of the chapters (&lt;a href=&#34;https://github.com/filipw/apress-recipes-webapi/tree/2733cc683ecacc01d038d76756275201efdb63ec/Chapter%2003/3-11/Apress.Recipes.WebApi/Apress.Recipes.WebApi&#34;&gt;source here&lt;/a&gt;), I&amp;rsquo;m discussing an in interesting approach towards route localization, using attribute routing.&lt;/p&gt;
&lt;p&gt;The whole idea came from the fact that at some point in the past I used to work on a really large application - 70+ language versions, all of which required localizations on the route level.&lt;/p&gt;
&lt;p&gt;That approach allowed you to define a single attribute route at action level (as opposed to, well, 70+ routes), and have it auto-translated by the plugged in infrastructure, as long as you provide the mapping to other languages at application startup.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how same type of functionality can be built in ASP.NET MVC 6.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Global route prefixes with attribute routing in ASP.NET 5 and MVC 6</title>
      <link>https://www.strathweb.com/2015/10/global-route-prefixes-with-attribute-routing-in-asp-net-5-and-mvc-6/</link>
      <pubDate>Fri, 16 Oct 2015 18:53:48 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/10/global-route-prefixes-with-attribute-routing-in-asp-net-5-and-mvc-6/</guid>
      <description>&lt;p&gt;In the last post a few days ago we looked at &lt;a href=&#34;https://www.strathweb.com/2015/10/global-route-prefixes-with-attribute-routing-in-asp-net-web-api/&#34;&gt;adding a centralized route prefix&lt;/a&gt; to attribute routing in ASP.NET Web API.&lt;/p&gt;
&lt;p&gt;I got a couple of follow up question about how to achieve the same in ASP.NET 5 and MVC 6 framework. Let&amp;rsquo;s have a look then (btw: this article is written using beta8 version of ASP.NET 5).&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Global route prefixes with attribute routing in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2015/10/global-route-prefixes-with-attribute-routing-in-asp-net-web-api/</link>
      <pubDate>Mon, 12 Oct 2015 03:00:25 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/10/global-route-prefixes-with-attribute-routing-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;As you may have learnt from some of the older posts, I am a big fan, and a big proponent of attribute routing in ASP.NET Web API.&lt;/p&gt;
&lt;p&gt;One of the things that is missing out of the box in Web API&amp;rsquo;s implementation of attribute routing, is the ability to define global prefixes (i.e. a global &amp;ldquo;api&amp;rdquo; that would be prepended to every route) - that would allow you to avoid repeating the same part of the URL over and over again on different resources. However, using the available extensibility points, you can provide that functionality yourself.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using Roslyn and unit tests to enforce coding guidelines and more</title>
      <link>https://www.strathweb.com/2015/09/using-roslyn-and-unit-tests-to-enforce-coding-guidelines-and-more/</link>
      <pubDate>Fri, 25 Sep 2015 11:48:37 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/09/using-roslyn-and-unit-tests-to-enforce-coding-guidelines-and-more/</guid>
      <description>&lt;p&gt;Last year, during a few of my Roslyn talks, I was presenting a cool idea of leveraging Roslyn in unit tests to enforce a certain style in code, and in general inspect the consistency of the code in various ways.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a really powerful concept, and something I wanted to blog about, but of course forgot - until I was reminded of that yesterday on Twitter.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running a C# REPL in a DNX application with scriptcs</title>
      <link>https://www.strathweb.com/2015/09/running-a-c-repl-in-a-dnx-application-with-scriptcs/</link>
      <pubDate>Tue, 15 Sep 2015 21:05:44 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/09/running-a-c-repl-in-a-dnx-application-with-scriptcs/</guid>
      <description>&lt;p&gt;One of the cool things that &lt;a href=&#34;https://github.com/scriptcs/scriptcs&#34;&gt;scriptcs&lt;/a&gt; allows you to do, is that you can embed it into your application and allow execution of C# scripts. There are even some great resources on that out there, like &lt;a href=&#34;http://madstt.dk/endeavours-with-scriptcs-hosting/&#34;&gt;this awesome post by Mads&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The same applies to the REPL functionality - you don&amp;rsquo;t have to use &lt;em&gt;scriptcs.exe&lt;/em&gt; to access the REPL - you can use the scriptcs Nuget packages to create a REPL inside your app.&lt;/p&gt;
&lt;p&gt;And because there aren&amp;rsquo;t that many resources (if any) on how to host a scriptcs REPL, today I wanted to show you just that. But for a more interesting twist, we&amp;rsquo;ll do that inside a DNX application.&lt;/p&gt;
&lt;p&gt;There are many reasons why DNX is awesome, and why you&amp;rsquo;d want to use it, but especially because, through the &lt;em&gt;project.json&lt;/em&gt; project system, it has a much improved way of referencing and loading dependencies and Nuget packages - and we can leverage that mechanism to feed assemblies into our REPL.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Hacking DNX to run C# scripts</title>
      <link>https://www.strathweb.com/2015/09/hacking-dnx-to-run-c-scripts/</link>
      <pubDate>Tue, 01 Sep 2015 13:29:49 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/09/hacking-dnx-to-run-c-scripts/</guid>
      <description>&lt;p&gt;Because of my considerable community involvement in promoting C# scripting (i.e. &lt;a href=&#34;https://github.com/scriptcs/scriptcs&#34;&gt;here&lt;/a&gt; or &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn&#34;&gt;here&lt;/a&gt;), I thought the other day, why not attempt to run C# scripts using DNX?&lt;/p&gt;
&lt;p&gt;While out of the box, DNX only compiles proper, traditional C# only, thanks to the compilation hooks it exposes, it is possible to intercept the compilation object prior to it being actually emitted, which allows you to do just about anything - including run C# scripts.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s explore more.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Disposing resources at the end of Web API request</title>
      <link>https://www.strathweb.com/2015/08/disposing-resources-at-the-end-of-web-api-request/</link>
      <pubDate>Sun, 09 Aug 2015 09:55:16 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/08/disposing-resources-at-the-end-of-web-api-request/</guid>
      <description>&lt;p&gt;Sometimes you have resources in your code that are implementing &lt;em&gt;IDisposable&lt;/em&gt;, and that you&amp;rsquo;d like them to be disposed only at the end of the HTTP request. I have seen a solution to this problem rolled out by hand in a few code bases in the past - but in fact this feature is already built into Web API, which I don&amp;rsquo;t think a lot of people are aware of.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a quick look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Action filters, service filters and type filters in ASP.NET 5 and MVC 6</title>
      <link>https://www.strathweb.com/2015/06/action-filters-service-filters-type-filters-asp-net-5-mvc-6/</link>
      <pubDate>Mon, 08 Jun 2015 21:29:12 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/06/action-filters-service-filters-type-filters-asp-net-5-mvc-6/</guid>
      <description>&lt;p&gt;Today, let&amp;rsquo;s have a look at he area of filters in ASP.NET MVC 6 - because it actually contains quite a few interesting changes compared to classic MVC and Web API filter pipelines.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s leave the specialized filters (error filters, authorization filters) on a side for now, and focus instead on the functional, aspect oriented, filters. Aside from the good old action filters, known from both MVC and from Web API, there are two new types of filters (or rather filter factories, but we&amp;rsquo;ll get there) that you can use - &lt;em&gt;ServiceFilters&lt;/em&gt; and &lt;em&gt;TypeFilters&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Integration testing ASP.NET 5 and ASP.NET MVC 6 applications</title>
      <link>https://www.strathweb.com/2015/05/integration-testing-asp-net-5-asp-net-mvc-6-applications/</link>
      <pubDate>Tue, 19 May 2015 11:05:06 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/05/integration-testing-asp-net-5-asp-net-mvc-6-applications/</guid>
      <description>&lt;p&gt;The other day I ran into a &lt;a href=&#34;https://alexanderzeitler.com/articles/Integration-testing-ASP.NET-5-Controllers-with-DNX-Beta4/&#34;&gt;post by Alex Zeitler&lt;/a&gt;, who blogged about integration testing of ASP.NET MVC 6 controllers. Alex has done some great work for the Web API community in the past and I always enjoy his posts.&lt;/p&gt;
&lt;p&gt;In this case, Alex suggested using self hosting for that, so spinning up a server and hitting it over HTTP and then shutting down, as part of each test case. Some people have done that in the past with Web API too, but is not an approach I agree with when doing integration testing. If you follow this blog you might have seen my post about testing &lt;a href=&#34;https://www.strathweb.com/2013/12/owin-memory-integration-testing/&#34;&gt;OWIN apps&lt;/a&gt; and &lt;a href=&#34;https://www.strathweb.com/2012/06/asp-net-web-api-integration-testing-with-in-memory-hosting/&#34;&gt;Web API apps&lt;/a&gt; in memory already.&lt;/p&gt;
&lt;p&gt;My main issue with the self-host approach, is that you and up testing the underlying operating system networking stack, the so-called &amp;ldquo;wire&amp;rdquo; which is not necessarily something you want to test - given that it will be different anyway in production (especially if you intend to run on IIS). On the other hand, you want to be able to run end-to-end tests quickly anywhere - developer&amp;rsquo;s machine, integration server or any other place that it might be necessary, and doing it entirely in memory is a great approach.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET MVC 6 formatters – XML and browser requests</title>
      <link>https://www.strathweb.com/2015/04/asp-net-mvc-6-formatters-xml-browser-requests/</link>
      <pubDate>Fri, 24 Apr 2015 11:32:15 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/04/asp-net-mvc-6-formatters-xml-browser-requests/</guid>
      <description>&lt;p&gt;A while ago I &lt;a href=&#34;https://www.strathweb.com/2014/11/formatters-asp-net-mvc-6/&#34;&gt;wrote a post&lt;/a&gt; about formatters in MVC 6.&lt;/p&gt;
&lt;p&gt;Since then, there have been some changes regarding XML handling and an interesting feature that was added recently that was not part of that post, so I think it warranties a follow up. XML formatter is now removed by default. On top of that, MVC 6 will attempt to sniff out whether your request is originating from a browser&amp;rsquo;s address bar and adjust content negotiation accordingly.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>How ASP.NET MVC 6 discovers controllers?</title>
      <link>https://www.strathweb.com/2015/04/asp-net-mvc-6-discovers-controllers/</link>
      <pubDate>Wed, 01 Apr 2015 09:58:29 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/04/asp-net-mvc-6-discovers-controllers/</guid>
      <description>&lt;p&gt;In the past I did a couple of blog posts (&lt;a href=&#34;https://www.strathweb.com/2013/08/customizing-controller-discovery-in-asp-net-web-api/&#34;&gt;here&lt;/a&gt; and &lt;a href=&#34;https://www.strathweb.com/2012/06/using-controllers-from-an-external-assembly-in-asp-net-web-api/&#34;&gt;here&lt;/a&gt;) about how ASP.NET Web API discovers controllers.&lt;/p&gt;
&lt;p&gt;ASP.NET MVC 6 supports both regular controllers (inheriting from &lt;em&gt;Controller&lt;/em&gt; base type) and POCO controllers. Let&amp;rsquo;s have a look at how the discovery of them happens in ASP.NET MVC 6. Note that the code and mechanisms discussed in this article were introduced after ASP.NET 5 beta3 was released, so it is not yet available if you use the version of ASP.NET 5 bundled with Visual Studio 2015 CTP6.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Strongly typed routing for ASP.NET MVC 6 with IApplicationModelConvention</title>
      <link>https://www.strathweb.com/2015/03/strongly-typed-routing-asp-net-mvc-6-iapplicationmodelconvention/</link>
      <pubDate>Wed, 11 Mar 2015 18:28:27 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/03/strongly-typed-routing-asp-net-mvc-6-iapplicationmodelconvention/</guid>
      <description>&lt;p&gt;This is something I hacked together last night, but it was a very interesting exercise into customizing the new (or rather, future) ASP.NET MVC 6 to suit your needs.&lt;/p&gt;
&lt;p&gt;If you visit this blog from time to time, some time ago I &lt;a href=&#34;https://www.strathweb.com/2014/07/building-strongly-typed-route-provider-asp-net-web-api/&#34;&gt;blogged about building strongly typed routing provider for ASP.NET Web API&lt;/a&gt; (&lt;a href=&#34;https://github.com/filipw/Strathweb.TypedRouting&#34;&gt;code is here&lt;/a&gt;). That was built around extensibility points provided by the direct routing mechanism (better known as direct routing&amp;rsquo;s default implementation - attribute routing).&lt;/p&gt;
&lt;p&gt;So I thought, it would be fun to port this solution to MVC 6. However, while MVC 6 supports attribute routing, it does not provide the same abstractions over the routing mechanism. Instead it exposes something new for both MVC and Web API developers - &lt;em&gt;IApplicationModelConvention&lt;/em&gt;, which is what we&amp;rsquo;ll use here.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Migrating from ASP.NET Web API to MVC 6 – exploring Web API Compatibility Shim</title>
      <link>https://www.strathweb.com/2015/01/migrating-asp-net-web-api-mvc-6-exploring-web-api-compatibility-shim/</link>
      <pubDate>Wed, 21 Jan 2015 12:59:52 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/01/migrating-asp-net-web-api-mvc-6-exploring-web-api-compatibility-shim/</guid>
      <description>&lt;p&gt;Migrating an MVC 5 project to ASP.NET 5 and MVC 6 is a big challenge given that both of the latter are complete rewrites of their predecessors. As a result, even if on the surface things seem similar (we have controllers, filters, actions etc), as you go deeper under the hood you realize that most, if not all, of your pipeline customizations will be incompatible with the new framework.&lt;/p&gt;
&lt;p&gt;This pain is even more amplified if you try to migrate Web API 2 project to MVC 6 - because Web API had a bunch of its own unique concepts and specialized classes, all of which only complicate the migration attempts.&lt;/p&gt;
&lt;p&gt;ASP.NET team provides an extra convention set on top of MVC 6, called &lt;a href=&#34;https://github.com/aspnet/Mvc/tree/dev/src/Microsoft.AspNet.Mvc.WebApiCompatShim&#34;&gt;&amp;ldquo;Web API Compatibility Shim&amp;rdquo;&lt;/a&gt;, which can be enabled make the process of migration from Web API 2 a bit easier. Let&amp;rsquo;s explore what&amp;rsquo;s in there.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET MVC 6 attribute routing – the [controller] and [action] tokens</title>
      <link>https://www.strathweb.com/2015/01/asp-net-mvc-6-attribute-routing-controller-action-tokens/</link>
      <pubDate>Wed, 07 Jan 2015 12:28:29 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/01/asp-net-mvc-6-attribute-routing-controller-action-tokens/</guid>
      <description>&lt;p&gt;When working with attribute routing in Web API 2 or MVC 5 it was relatively easy to get the route to the controller and the controller name out of sync. That was because the route always had to be specified as a string, so whenever you changed the name of the controller you would always have to change the string in the route attribute too.&lt;/p&gt;
&lt;p&gt;That could be easily forgotten - especially if you use refactoring tools of Visual Studio or an external refactoring plugin.&lt;/p&gt;
&lt;p&gt;This issue has been addressed in MVC6 with a tiny addition - the introduction of &lt;em&gt;[controller]&lt;/em&gt; ad &lt;em&gt;[action]&lt;/em&gt; tokens into attribute routing.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Scriptcs gets new REPL commands and is now better than ever</title>
      <link>https://www.strathweb.com/2014/12/scriptcs-gets-new-repl-commands-now-better-ever/</link>
      <pubDate>Tue, 23 Dec 2014 15:52:12 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/12/scriptcs-gets-new-repl-commands-now-better-ever/</guid>
      <description>&lt;p&gt;Yesterday the scriptcs project got an &lt;a href=&#34;https://github.com/scriptcs/scriptcs/pull/830&#34;&gt;little injection of awesomeness&lt;/a&gt; through a set of new REPL commands we have added. You can now conveniently access a bunch of contextual information about your REPL session - the idea is to make your work with the REPL smoother, more productive and, of course, more enjoyable. Let&amp;rsquo;s quickly walk through them in this post.&lt;/p&gt;
&lt;p&gt;By the way, it&amp;rsquo;s a good moment to remind that the REPL command infrastructure is fully extensible - so you can easily build up your own commands. &lt;a href=&#34;http://vimeo.com/97344529&#34;&gt;Watch my talk&lt;/a&gt; from NDC Oslo if you are interested, there is an example in there.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Razor views pre-compilation with ASP.NET 5 and MVC 6</title>
      <link>https://www.strathweb.com/2014/12/razor-views-pre-compilation-asp-net-5-mvc-6/</link>
      <pubDate>Fri, 12 Dec 2014 10:36:22 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/12/razor-views-pre-compilation-asp-net-5-mvc-6/</guid>
      <description>&lt;p&gt;In previous versions of MVC framework, running on top of the &amp;ldquo;classic&amp;rdquo; ASP.NET runtime, it was quite common for developers to switch view compilation on, so that the views get compiled upfront, allowing you to see any errors at compile time, rather than at runtime.&lt;/p&gt;
&lt;p&gt;This was done by a simply adding &lt;em&gt;&lt;MvcBuildViews&gt;true&lt;/MvcBuildViews&gt;&lt;/em&gt; to your &lt;em&gt;csproj&lt;/em&gt; file.&lt;/p&gt;
&lt;p&gt;Given that everything changes in the new ASP.NET 5 world, how would you do it now? Let&amp;rsquo;s explore.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Formatters in ASP.NET MVC 6</title>
      <link>https://www.strathweb.com/2014/11/formatters-asp-net-mvc-6/</link>
      <pubDate>Mon, 17 Nov 2014 12:01:30 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/11/formatters-asp-net-mvc-6/</guid>
      <description>&lt;p&gt;One of the key concepts in HTTP API development is the notion of content negotiation (conneg). ASP.NET Web API provided first class support for content negotiation through the use of &lt;em&gt;MediaTypeFormatters&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;While MVC 6 is a de facto brand new framework, rebuilt from scratch, the majority of concepts from MVC 5 and Web API 2 have naturally been brought forward, and conneg done through formatters are one of them.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at formatters in MVC6.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using ConfigR as a Configuration Source in ASP.NET vNext</title>
      <link>https://www.strathweb.com/2014/10/using-configr-configuration-source-asp-net-vnext/</link>
      <pubDate>Tue, 28 Oct 2014 14:37:09 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/10/using-configr-configuration-source-asp-net-vnext/</guid>
      <description>&lt;p&gt;One of the cool things about ASP.NET vNext is that it introudces a &lt;a href=&#34;https://github.com/aspnet/Configuration&#34;&gt;configuration abstraction&lt;/a&gt;, &lt;em&gt;Microsoft.Framework.ConfigurationModel&lt;/em&gt; over your application&amp;rsquo;s configuration.&lt;/p&gt;
&lt;p&gt;This is going to replace the old school, limiting approach of forcing you to work with XML configuration only through the &lt;em&gt;System.Configuration&lt;/em&gt; classes.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://twitter.com/loudej&#34;&gt;Louis DeJardin&lt;/a&gt; has blogged about the ideas behind the isolation of Configuration in his &lt;a href=&#34;http://whereslou.com/2014/05/23/asp-net-vnext-moving-parts-iconfiguration/&#34;&gt;blog post&lt;/a&gt;. In the meantime, let&amp;rsquo;s have a look at how we could enable a &lt;a href=&#34;https://github.com/config-r/config-r&#34;&gt;ConfigR&lt;/a&gt;-based configuration too.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building refactoring tools (diagnostics and code fixes) with Roslyn</title>
      <link>https://www.strathweb.com/2014/10/building-refactoring-tools-code-fixes-roslyn/</link>
      <pubDate>Mon, 13 Oct 2014 10:01:16 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/10/building-refactoring-tools-code-fixes-roslyn/</guid>
      <description>&lt;p&gt;Some time ago &lt;a href=&#34;https://www.strathweb.com/2013/02/building-web-api-visual-studio-support-tools-with-roslyn/&#34;&gt;I blogged&lt;/a&gt; about building next generation Visual Studio support tools with Roslyn. This was when Roslyn was still on its 2012 CTP. A lot has changed since then, with &lt;a href=&#34;http://roslyn.codeplex.com&#34;&gt;Roslyn going open source&lt;/a&gt;, and new iterations of the CTPs getting released.&lt;/p&gt;
&lt;p&gt;Most of the APIs used in the original have changed, so I thought it would be a good idea to do a new post, and rebuilt the sample used in the old post from scratch, using the latest Roslyn CTP.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Route matching and overriding 404 in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2014/10/route-matching-overriding-404-asp-net-web-api/</link>
      <pubDate>Mon, 06 Oct 2014 12:24:45 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/10/route-matching-overriding-404-asp-net-web-api/</guid>
      <description>&lt;p&gt;In ASP.NET Web API, if the incoming does not match any route, the framework is simply hard wired to return 404 to the client (or possibly pass through to the next configured middleware, in case of an OWIN hosted Web API). This is done immediately, without entering anywhere further down the pipeline (i.e. message handlers would not be invoked).&lt;/p&gt;
&lt;p&gt;However, an &lt;a href=&#34;http://stackoverflow.com/questions/26156750/how-to-set-asp-net-web-api-route-constraint-http-status-return-code/26201869&#34;&gt;interesting question was posted recently at StackOverflow&lt;/a&gt; - what if you want to override that hard 404, and given your specific routing requirements, respond to the client with a different status code if a specific route condition fails?&lt;/p&gt;
&lt;p&gt;I already &lt;a href=&#34;http://stackoverflow.com/questions/26156750/how-to-set-asp-net-web-api-route-constraint-http-status-return-code/26201869#26201869&#34;&gt;answered at StackOverflow&lt;/a&gt;, but decided this deserves a blog post regardless.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Over 100 ASP.NET Web API samples</title>
      <link>https://www.strathweb.com/2014/09/100-asp-net-web-api-samples/</link>
      <pubDate>Wed, 17 Sep 2014 08:53:51 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/09/100-asp-net-web-api-samples/</guid>
      <description>&lt;p&gt;As you might now by now, last month my &lt;a href=&#34;http://www.amazon.com/ASP-NET-Web-API-Recipes-Problem-Solution/dp/1430259809/ref=la_B00LSCXKQ0_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1406554887&amp;amp;sr=1-1&#34;&gt;ASP.NET Web API 2 Recipes&lt;/a&gt; book was released by &lt;a href=&#34;http://www.apress.com/9781430259800&#34;&gt;Apress&lt;/a&gt;. The book contains over 100 recipes covering various Web API scenarios that aim to help you save some headaches when working on your current or next Web API project.&lt;/p&gt;
&lt;p&gt;Each of the recipes has got an accompanying Visual Studio solution, which illustrates the given problem and presents a solution in a simple, isolated manner.&lt;/p&gt;
&lt;p&gt;Obviously, it would be great if you went ahead and bought a book (then you would get an in-depth analysis of each case), but the source code itself is available &lt;a href=&#34;https://github.com/filipw/apress-recipes-webapi&#34;&gt;for free at Github&lt;/a&gt; and as a &lt;a href=&#34;http://www.apress.com/downloadable/download/sample/sample_id/1591/&#34;&gt;download from Apress&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I hope it becomes a useful collection, illustrating how to deal with various Web API problems/scenarios.&lt;/p&gt;
&lt;p&gt;Please note that some of the early examples might appear simple or even trivial - that&amp;rsquo;s the case with introductory recipes, where the gist of the matter is discussed in the book itself.&lt;/p&gt;
&lt;p&gt;I have seen in some StackOverflow questions that the examples on Github have already helped a couple of folks, which is fantastic. You can find a summary of the samples below - they are structured in the book and in the &lt;a href=&#34;https://github.com/filipw/apress-recipes-webapi&#34;&gt;repository&lt;/a&gt; the same way.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Things you didn’t know about action return types in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2014/09/things-didnt-know-action-return-types-asp-net-web-api/</link>
      <pubDate>Thu, 11 Sep 2014 12:00:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/09/things-didnt-know-action-return-types-asp-net-web-api/</guid>
      <description>&lt;p&gt;When you are developing an ASP.NET Web API application, you can chose whether you want to return a POCO from your action, which can be any type that will then be serialized, an instance of &lt;em&gt;HttpResponseMessage&lt;/em&gt;, or, since Web API 2, an instance of &lt;em&gt;IHttpActionResult&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at what really happens under the hood afterwards, and discuss some of the things about the response pipeline that you might have not known before.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Strongly typed direct routing link generation in ASP.NET Web API with Drum</title>
      <link>https://www.strathweb.com/2014/08/strongly-typed-direct-routing-link-generation-asp-net-web-api-drum/</link>
      <pubDate>Thu, 28 Aug 2014 22:51:08 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/08/strongly-typed-direct-routing-link-generation-asp-net-web-api-drum/</guid>
      <description>&lt;p&gt;ASP.NET Web API provides an &lt;em&gt;IUrlHelper&lt;/em&gt; interface and the corresponding &lt;em&gt;UrlHelper&lt;/em&gt; class as a general, built-in mechanism you can use to generate links to your Web API routes. In fact, it&amp;rsquo;s similar in ASP.NET MVC, so this pattern has been familiar to most devs for a while.&lt;/p&gt;
&lt;p&gt;The main problem of it is that it&amp;rsquo;s based on magic strings, as, to generate a link, the route name has to be passed as a string literal. Moreover, all the parameters that are required to built up the link, are simply a set of name-values, represented by a dictionary or an anonymous object, which is hardly optimal. Code is not coherent, refactoring becomes a pain and in general error potential is high.&lt;/p&gt;
&lt;p&gt;My friend, and one of the most respected folks in the Web API community, &lt;a href=&#34;https://twitter.com/pmhsfelix&#34;&gt;Pedro Felix&lt;/a&gt;, has created a library called &lt;a href=&#34;https://github.com/pmhsfelix/drum&#34;&gt;Drum&lt;/a&gt;, designed to avoid the pitfalls of the &lt;em&gt;UrlHelper&lt;/em&gt;, allowing you to build links for Web API direct routing (introudced in Web API 2) in a strongly typed way.&lt;/p&gt;
&lt;p&gt;Drum works with any direct routing provider, including my own &lt;a href=&#34;https://www.strathweb.com/2014/07/building-strongly-typed-route-provider-asp-net-web-api/&#34;&gt;Strathweb.TypedRouting&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API 2: Recipes is out!</title>
      <link>https://www.strathweb.com/2014/08/asp-net-web-api-2-recipes/</link>
      <pubDate>Wed, 13 Aug 2014 12:30:20 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/08/asp-net-web-api-2-recipes/</guid>
      <description>My long promised book, ASP.NET Web API 2: Recipes has been published by Apress last week. I announced the book a while ago, when I also tried to explain the general idea behind the book. I nshort, I really wanted to write a no-nonsense, blog-like, problem-solution book for Web API.
Since then, as you may have noticed, the title got changed to reflect the latest iteration of Web API. The majority of recipes are compatible with both v1 and v2 of the framework, however some recipes are obviously Web API 2 only (i.</description>
    </item>
    
    <item>
      <title>Dependency injection directly into actions in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2014/07/dependency-injection-directly-actions-asp-net-web-api/</link>
      <pubDate>Wed, 30 Jul 2014 17:09:59 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/07/dependency-injection-directly-actions-asp-net-web-api/</guid>
      <description>&lt;p&gt;There is a ton of great material on the Internet about dependency injection in ASP.NET Web API. One thing that I have not seen anywhere though, is any information about how to inject dependencies into the action, instead of a controller (constructor injection).&lt;/p&gt;
&lt;p&gt;Injecting your dependencies directly into an action, rather than in the controller is a very reasonable approach, as it helps you falling into an over-injecting trap, and perhaps resolving too much things, for no real reason.&lt;/p&gt;
&lt;p&gt;With Web API, it&amp;rsquo;s actually extremely easy to do, so let&amp;rsquo;s go ahead and implement it.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building a strongly typed route provider for ASP.NET Web API</title>
      <link>https://www.strathweb.com/2014/07/building-strongly-typed-route-provider-asp-net-web-api/</link>
      <pubDate>Fri, 11 Jul 2014 08:56:17 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/07/building-strongly-typed-route-provider-asp-net-web-api/</guid>
      <description>&lt;p&gt;ASP.NET Web API 2.2 was released last week, and one of the key new features is the ability to extend and plug in your own custom logic into the attribute routing engine.&lt;/p&gt;
&lt;p&gt;Commonly known as &amp;ldquo;attribute routing&amp;rdquo;, it&amp;rsquo;s actually officially called &amp;ldquo;direct routing&amp;rdquo;, because, as we are about to show here, it&amp;rsquo;s not necessary to use it with attributes at all, and you can plug in any route provider into it.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>POCO controllers in ASP.NET vNext</title>
      <link>https://www.strathweb.com/2014/06/poco-controllers-asp-net-vnext/</link>
      <pubDate>Wed, 11 Jun 2014 09:34:38 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/06/poco-controllers-asp-net-vnext/</guid>
      <description>&lt;p&gt;One of the very cool features of the vNext of ASP.NET MVC (a unified framework set to succeed MVC, Web API and Web Pages) is the ability use POCO classes as controllers. No base class, no interface to implement, 100% convention.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s look a little bit into that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Announcing ASP.NET Web API Recipes</title>
      <link>https://www.strathweb.com/2014/05/announcing-asp-net-web-api-recipes/</link>
      <pubDate>Wed, 21 May 2014 14:27:31 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/05/announcing-asp-net-web-api-recipes/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.strathweb.com/images/2014/05/81iUYKuTehL._SL1500_.jpg&#34;&gt;&lt;img src=&#34;https://www.strathweb.com/images/2014/05/81iUYKuTehL._SL1500_-243x300.jpg&#34; alt=&#34;81iUYKuTehL._SL1500_&#34; width=&#34;243&#34; height=&#34;300&#34; class=&#34;aligncenter size-medium wp-image-1138&#34; style=&#34;float:left; margin: 0 15px 0 0&#34; /&gt;&lt;/a&gt;It is my pleasure to announce that this summer my ASP.NET Web API book will be released. It&amp;rsquo;s entitled &amp;ldquo;ASP.NET Web API Recipes&amp;rdquo;, and will be published by Apress.&lt;/p&gt;
&lt;p&gt;While the publication date is not set in stone yet (probably early August), you can already pre-order at:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://www.apress.com/9781430259800&#34;&gt;Apress&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://www.amazon.com/ASP-NET-Web-API-Recipes-Problem-Solution/dp/1430259809/ref=sr_1_1?ie=UTF8&amp;amp;qid=1400681290&amp;amp;sr=8-1&amp;amp;keywords=web+api+recipes&#34;&gt;Amazon&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The idea behind the book is quite simple - to discuss and dissect some of the most common problems and issues you might encounter in your work with Web API solutions.&lt;/p&gt;
&lt;p&gt;There is going to be a total of 12 chapters with about 10 recipes per chapter (the number varies obviously). You will also get a full VS project with source code per each recipe.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Ignoring routes in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2014/04/ignoring-routes-asp-net-web-api/</link>
      <pubDate>Wed, 23 Apr 2014 14:32:08 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/04/ignoring-routes-asp-net-web-api/</guid>
      <description>&lt;p&gt;If you use centralized routing, it is occasionally needed to ignore a greedy Web API route so that the request can be processed by some other component or handler.&lt;/p&gt;
&lt;p&gt;One of the tiny overlooked features of Web API 2.1 was that it finally shipped with a cross-host way to ignore routes. It&amp;rsquo;s not too exciting, as it&amp;rsquo;s something that&amp;rsquo;s been in MVC for ages, but it&amp;rsquo;s nice to finally have an easy way to do it in Web API.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Opt in and opt out from ASP.NET Web API Help Page</title>
      <link>https://www.strathweb.com/2014/04/opt-opt-asp-net-web-api-help-page/</link>
      <pubDate>Wed, 09 Apr 2014 09:00:05 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/04/opt-opt-asp-net-web-api-help-page/</guid>
      <description>&lt;p&gt;The autogenerated ASP.NET Web API help page is an extremely useful tool for documenting your Web API. It can not only present information about the routes, but also show sample requests and responses in all of supported media type formats, and even display information for &lt;em&gt;DataAnnotations&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;However, more often than not, you don&amp;rsquo;t want &lt;em&gt;all&lt;/em&gt; endpoints to be visible in the help page. Let&amp;rsquo;s have a look at how you can opt in and opt out from the ASP.NET Web API Help Page with your resources.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API exception logging with Raygun.io</title>
      <link>https://www.strathweb.com/2014/03/asp-net-web-api-exception-logging-raygun-io/</link>
      <pubDate>Thu, 20 Mar 2014 10:56:49 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/03/asp-net-web-api-exception-logging-raygun-io/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://twitter.com/jongalloway&#34;&gt;Jon Galloway&lt;/a&gt; recently wrote a monster &lt;a href=&#34;http://weblogs.asp.net/jgalloway/archive/2014/02/26/looking-at-asp-net-mvc-5-1-and-web-api-2-1-part-4-web-api-help-pages-bson-and-global-error-handling.aspx&#34;&gt;4-part series&lt;/a&gt; covering the new features of MVC 5.1 and Web API 2.1 releases. One thing he mentioned was the new &lt;em&gt;IExceptionLogger&lt;/em&gt; for Web API, and he called out the community to provide some example implementations of it.&lt;/p&gt;
&lt;p&gt;Therefore, let&amp;rsquo;s have a look at how you&amp;rsquo;d approach that - with a sample of logging Exceptions to the excellent &lt;a href=&#34;http://raygun.io/&#34;&gt;Raygun&lt;/a&gt; service from &lt;a href=&#34;http://www.mindscapehq.com/&#34;&gt;Mindscape&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Per request tracing in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2014/03/per-request-tracing-asp-net-web-api/</link>
      <pubDate>Sat, 08 Mar 2014 10:34:22 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/03/per-request-tracing-asp-net-web-api/</guid>
      <description>&lt;p&gt;Web API allows you to plug in extensive logging mechanism through the &lt;em&gt;ITraceWriter&lt;/em&gt; service. This will log all important events in the pipeline - such as selection of the controller, action, parameter binding and so on - all of which are extremely important in debugging all kinds of issues.&lt;/p&gt;
&lt;p&gt;However, any existing instance of an &lt;em&gt;ITraceWriter&lt;/em&gt; would log all of the information aside - into a log file, trace, database. But what if you wanted all the trace information produced while the given request was being processed, to be returned together with the server response?&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running the OWIN pipeline in the new .NET Azure Mobile Services</title>
      <link>https://www.strathweb.com/2014/02/running-owin-pipeline-new-net-azure-mobile-services/</link>
      <pubDate>Fri, 21 Feb 2014 09:05:59 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/02/running-owin-pipeline-new-net-azure-mobile-services/</guid>
      <description>&lt;p&gt;Yesterday, a preview of the .NET Azure Mobile Services &lt;a href=&#34;http://weblogs.asp.net/scottgu/archive/2014/02/20/azure-expressroute-dedicated-networking-web-site-backup-restore-mobile-services-net-support-hadoop-2-2-and-more.aspx&#34;&gt;has been released&lt;/a&gt;. Despite the fact that I&amp;rsquo;d rather see a scripted C# support 🙂 - I am still very excited about this new .NET support, as ZUMO is one of my favorite Azure offerings.&lt;/p&gt;
&lt;p&gt;The whole thing is in preview right now and runs on Web API (version 5.1 at the moment, so not the latest) but the team has made several very smart decisions, which I am sure the community will welcome with open arms. One of them is the ability to plug in &lt;strong&gt;your OWIN pipeline&lt;/strong&gt;!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Getting started with OData v4 in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2014/02/getting-started-odata-v4-asp-net-web-api/</link>
      <pubDate>Tue, 18 Feb 2014 12:38:05 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/02/getting-started-odata-v4-asp-net-web-api/</guid>
      <description>&lt;p&gt;Since yesterday, the ASP.NET Web stack nightly feed contains the packages supporting OData v4. The package is called &lt;em&gt;Microsoft.AspNet.OData&lt;/em&gt; and has a working version 5.2.0 - so I&amp;rsquo;m guessing this is intended to ship with Web API 2.&lt;/p&gt;
&lt;p&gt;It relies on the latest beta of &lt;em&gt;Microsoft.OData.Core&lt;/em&gt;. OData v4 is a massive changed compared to v3 - you can read about all of them [here][1].&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Return types, action parameters and data annotations now available in Web API 2.1 Help Page</title>
      <link>https://www.strathweb.com/2014/01/return-types-action-parameters-and-data-annotations-now-available-in-web-api-2-1-help-page/</link>
      <pubDate>Tue, 21 Jan 2014 08:41:00 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/01/return-types-action-parameters-and-data-annotations-now-available-in-web-api-2-1-help-page/</guid>
      <description>&lt;p&gt;On Friday Microsoft released a 2.1 version of Web API (along with MVC 5.1 and Web Pages 3.1). The release announcement was made yesterday and can be &lt;a href=&#34;http://blogs.msdn.com/b/webdev/archive/2014/01/20/announcing-the-release-of-asp-net-mvc-5-1-asp-net-web-api-2-1-and-asp-net-web-pages-3-1.aspx&#34;&gt;read here&lt;/a&gt; - but pretty much all of the new features have already been discussed on this blog, when we dissected the 2.1 RC released &lt;a href=&#34;https://www.strathweb.com/2013/12/asp-net-web-api-2-1-rc-whats-new/&#34;&gt;last month&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One thing I wanted to highlight today though, are the changes to the Help Page, and its new capabilities to document return types, action parameters and data annotations on your models/DTOs.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>OWIN/Katana in-memory integration testing</title>
      <link>https://www.strathweb.com/2013/12/owin-memory-integration-testing/</link>
      <pubDate>Mon, 30 Dec 2013 09:40:47 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/12/owin-memory-integration-testing/</guid>
      <description>&lt;p&gt;A while ago we looked at testing the ASP.NET Web API pipeline using its &lt;a href=&#34;https://www.strathweb.com/2012/06/asp-net-web-api-integration-testing-with-in-memory-hosting/&#34;&gt;in-memory hosting capabilities&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The advantages of such approach to end-to-end testing are unquestionable.&lt;/p&gt;
&lt;p&gt;Now, with the emergence of OWIN as the primary hosting option for a wide array of web frameworks, it makes sense to explore how you could to the same, except in the OWIN (or rather &lt;a href=&#34;http://katanaproject.codeplex.com&#34;&gt;Katana&lt;/a&gt;, since all the things shown here are Katana specific) context - so not just against Web API, but against any framework of your choice (running on top of OWIN &amp;amp; Katana).&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API 2.1 RC is out – what’s new?</title>
      <link>https://www.strathweb.com/2013/12/asp-net-web-api-2-1-rc-whats-new/</link>
      <pubDate>Tue, 10 Dec 2013 08:23:33 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/12/asp-net-web-api-2-1-rc-whats-new/</guid>
      <description>&lt;p&gt;It seems that only yesterday we were &lt;a href=&#34;https://www.strathweb.com/2013/10/asp-net-web-api-2-is-out-overview-of-features/&#34;&gt;blogging about new features in Web API 2&lt;/a&gt; and discussing what&amp;rsquo;s coming up next for Web API at the MVP Summit.&lt;/p&gt;
&lt;p&gt;Meanwhile, the ASP.NET team kept it&amp;rsquo;s frantic work pace and already before Christmas dropped on &lt;a href=&#34;https://www.nuget.org/packages/Microsoft.AspNet.WebApi/5.1.0-rc1&#34;&gt;Nuget&lt;/a&gt; a 2.1 RC of Web API (as well as new MVC and Web Pages).&lt;/p&gt;
&lt;p&gt;While in the open source mode of operation (public commits, nightly builds) this is that big of a news, it is still a very nice piece of news. Let&amp;rsquo;s look at what&amp;rsquo;s new.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Easier Redis development with scriptcs and ServiceStack.Redis powered C# REPL</title>
      <link>https://www.strathweb.com/2013/12/easier-redis-development-scriptcs-servicestack-redis-powered-c-repl/</link>
      <pubDate>Mon, 09 Dec 2013 07:53:57 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/12/easier-redis-development-scriptcs-servicestack-redis-powered-c-repl/</guid>
      <description>&lt;p&gt;In my current project I am working a lot with Redis on the back end. What I have found extremely useful is the ability to work with Redis directly from its REPL (&lt;em&gt;redis-cli&lt;/em&gt;), to instantly check or reset the objects stored there.&lt;/p&gt;
&lt;p&gt;However, working in the C# environment, the basic &lt;em&gt;redis-cli&lt;/em&gt; is definitely not enough to facilitate productive development.&lt;/p&gt;
&lt;p&gt;Enter &lt;a href=&#34;https://github.com/scriptcs/scriptcs&#34;&gt;scriptcs&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Asynchronous action filters in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/11/asynchronous-action-filters-asp-net-web-api/</link>
      <pubDate>Sun, 24 Nov 2013 17:37:49 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/11/asynchronous-action-filters-asp-net-web-api/</guid>
      <description>&lt;p&gt;It is rather to common to use filters in Web API to perform common tasks around your actions in an AOP (aspect oriented programming) way.&lt;/p&gt;
&lt;p&gt;To create a filter you simply inherit from an abstract &lt;em&gt;ActionFilterAttribute&lt;/em&gt; class and override the relevant method:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;abstract&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;ActionFilterAttribute&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;FilterAttribute&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;IActionFilter&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;virtual&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OnActionExecuting&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;HttpActionContext&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;actionContext&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;virtual&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OnActionExecuted&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;HttpActionExecutedContext&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;actionExecutedContext&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is all nice and simple, but what if the operation you need to perform, should by &lt;em&gt;asynchronous&lt;/em&gt;? Surely &lt;em&gt;async void&lt;/em&gt; is a &lt;a href=&#34;http://msdn.microsoft.com/en-us/magazine/jj991977.aspx&#34;&gt;terrible idea&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Output Caching in ASP.NET Web API 2</title>
      <link>https://www.strathweb.com/2013/11/output-caching-asp-net-web-api-2/</link>
      <pubDate>Thu, 07 Nov 2013 08:14:10 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/11/output-caching-asp-net-web-api-2/</guid>
      <description>&lt;p&gt;A while ago I released a little library for Web API caching - called &lt;a href=&#34;https://github.com/filipw/AspNetWebApi-OutputCache/&#34;&gt;CacheOutput&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;With the release of Web API 2, some things change (obviously the Web API core gets a bump to 5.0) so the library required a new release. I have decided to take a page out of the book of my friends over at &lt;a href=&#34;http://www.nuget.org/packages/Autofac.WebApi2/&#34;&gt;Autofac&lt;/a&gt;, and do not release over the old Nuget package, but instead release a new one &lt;strong&gt;specifically&lt;/strong&gt; for Web API 2.&lt;/p&gt;
&lt;p&gt;If you are in need of caching for Web API 2, you should use the package called &lt;a href=&#34;http://www.nuget.org/packages/Strathweb.CacheOutput.WebApi2/&#34;&gt;Strathweb.CacheOutput.WebApi2&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API 2 is out! Overview of features</title>
      <link>https://www.strathweb.com/2013/10/asp-net-web-api-2-is-out-overview-of-features/</link>
      <pubDate>Thu, 17 Oct 2013 21:15:46 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/10/asp-net-web-api-2-is-out-overview-of-features/</guid>
      <description>&lt;p&gt;Today the ASP.NET team released ASP.NET Web API 2 (and, for that matter, MVC 5 too)! The announcement, just as like year, followed many other big Microsoft releases (Windows 8.1, Visual Studio 2013 etc) in a synchronized product shipping event.&lt;/p&gt;
&lt;p&gt;New Web API is now available on &lt;a href=&#34;http://www.nuget.org/packages/Microsoft.AspNet.WebApi&#34;&gt;Nuget&lt;/a&gt; - where it directly replaces the old version of Web API. Let&amp;rsquo;s look at the major features of ASP.NET Web API 2.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Extend Glimpse on the fly – scriptcs code execution tab in Glimpse</title>
      <link>https://www.strathweb.com/2013/10/extend-glimpse-fly-scriptcs-code-execution-tab-glimpse/</link>
      <pubDate>Sun, 06 Oct 2013 10:47:33 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/10/extend-glimpse-fly-scriptcs-code-execution-tab-glimpse/</guid>
      <description>&lt;p&gt;In &lt;a href=&#34;http://www.scriptcs.net&#34;&gt;scriptcs&lt;/a&gt;, one of the things we have been paying lots of attention to recently, is the hosting story. Scriptcs CLI is simply just one of the clients using the core scriptcs libraries - which can be used to embed the rich scriptcs code parsing and execution capabilities in any app.&lt;/p&gt;
&lt;p&gt;This weekend I put together a small &lt;a href=&#34;http://www.getglimpse.com&#34;&gt;Glimpse plugin&lt;/a&gt; which uses scriptcs hosting, and can be used for executing arbitrary code against the context of your ASP.NET application.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Dynamic per-controller HttpConfiguration in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/09/dynamic-per-controller-httpconfiguration-asp-net-web-api/</link>
      <pubDate>Sun, 29 Sep 2013 11:27:24 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/09/dynamic-per-controller-httpconfiguration-asp-net-web-api/</guid>
      <description>&lt;p&gt;Recently I faced an interesting problem, where we needed to provide controllers with controller-specific configuration - but based on settings only known at runtime.&lt;/p&gt;
&lt;p&gt;In Web API, per-controller configuration is a very useful, yet little known feature (aside from a &lt;a href=&#34;http://blogs.msdn.com/b/jmstall/archive/2012/05/11/per-controller-configuration-in-webapi.aspx&#34;&gt;great blog post by Mike Stall&lt;/a&gt;), as it allows you to create configuration profiles and assign them to specific controllers.&lt;/p&gt;
&lt;p&gt;However it is only supported statically - through attributes, so it cannot be altered at runtime. Let&amp;rsquo;s have a look at how you might be able to hack away at it.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Adding high performance Windows Azure Cache Service to your ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/09/adding-high-performance-windows-azure-cache-service-to-your-asp-net-web-api/</link>
      <pubDate>Fri, 13 Sep 2013 10:06:59 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/09/adding-high-performance-windows-azure-cache-service-to-your-asp-net-web-api/</guid>
      <description>&lt;p&gt;Microsoft has recently announced the preview release of Windows Azure Cache Service - intended to allow you to easily deploy high performance, dedicated, distributed cache for your applications.&lt;/p&gt;
&lt;p&gt;You can read more about the feature (and it does seem really awesome at first glance), in the thorough &lt;a href=&#34;http://weblogs.asp.net/scottgu/archive/2013/09/03/windows-azure-new-distributed-dedicated-high-performance-cache-service-more-cool-improvements.aspx&#34;&gt;announcement post&lt;/a&gt; by Scott Guthrie.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s look at how you can leverage this powerful service from ASP.NET Web API.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API 2 and HttpRequestContext</title>
      <link>https://www.strathweb.com/2013/08/asp-net-web-api-2-and-httprequestcontext/</link>
      <pubDate>Fri, 30 Aug 2013 08:27:22 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/08/asp-net-web-api-2-and-httprequestcontext/</guid>
      <description>&lt;p&gt;Last week (23 August) ASP.NET Web API 2 RC (release candidate) was released on Nuget. One of the interesting changes in this version is the emergence of &lt;em&gt;HttpRequestContext&lt;/em&gt; - which provides a shortcut, strongly typed access to the information which up to this point hidden inside of &lt;em&gt;Request.Properties&lt;/em&gt; dictionary, as well as some additional useful bits and pieces.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s explore what&amp;rsquo;s under the hood.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Customizing controller discovery in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/08/customizing-controller-discovery-in-asp-net-web-api/</link>
      <pubDate>Mon, 19 Aug 2013 19:43:55 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/08/customizing-controller-discovery-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;One of the useful configuration features of ASP.NET Web API is that it allows you to be explicit about the assemblies into which it will look in order to discover controller types.&lt;/p&gt;
&lt;p&gt;This is especially useful if you have assemblies residing outside of the bin folder, or if you are doing self hosting, and the controllers assemblies are not automatically loaded into the current &lt;em&gt;AppDomain&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;There are several hooks in the pipeline that you can plug into to achieve this goal. Let&amp;rsquo;s explore them, discussing the pros and cons of using any of these.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Message handlers scoped per route in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/08/message-handlers-scoped-per-route-in-asp-net-web-api/</link>
      <pubDate>Sun, 11 Aug 2013 08:49:17 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/08/message-handlers-scoped-per-route-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;A lot of Web API functionalities are based around message handlers. The real power of them is that they run for every request and provide an easy mechanism of globally addressing some of the application concerns (such as i.e. security). However, there are situations where you&amp;rsquo;d like to use a handler to apply specific behavior to only a selected portion of an application.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how you&amp;rsquo;d do it with route-specific message handlers&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Owin middleware, ASP.NET Web API and client’s IP address</title>
      <link>https://www.strathweb.com/2013/07/owin-middleware-asp-net-web-api-and-clients-ip-address/</link>
      <pubDate>Wed, 31 Jul 2013 20:03:18 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/07/owin-middleware-asp-net-web-api-and-clients-ip-address/</guid>
      <description>&lt;p&gt;Not so long ago, &lt;a href=&#34;https://www.strathweb.com/2013/05/retrieving-the-clients-ip-address-in-asp-net-web-api/&#34;&gt;we discussed&lt;/a&gt; on this blog the possible ways of retrieving the client&amp;rsquo;s IP address in ASP.NET Web API.&lt;/p&gt;
&lt;p&gt;With the latest changes in the Web API 2 infrastructure, and the emergence of Owin and the &lt;a href=&#34;http://katanaproject.codeplex.com&#34;&gt;Katana project&lt;/a&gt; as the common glue between the underlying host and the web framework(s) running on it, it&amp;rsquo;s becoming natural to move these types of application-wide concerns (security, logging etc) to Owin middleware.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how you could - as an introductory example - obtain client&amp;rsquo;s IP address at the Owin middleware level, and why is it beneficial.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Scriptcs and multiline REPL!</title>
      <link>https://www.strathweb.com/2013/07/scriptcs-and-multiline-repl/</link>
      <pubDate>Tue, 23 Jul 2013 18:48:44 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/07/scriptcs-and-multiline-repl/</guid>
      <description>&lt;p&gt;A while ago, we &lt;a href=&#34;http://codebetter.com/glennblock/2013/05/07/scriptcs-gets-a-repl/&#34;&gt;added&lt;/a&gt; a killer REPL feature to the &lt;a href=&#34;https://github.com/scriptcs/scriptcs&#34;&gt;scriptcs project&lt;/a&gt;. Recently, we followed it up with adding support for one of the most popular requested features - multiline constructs for the REPL.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s not yet available in the stable version available via Chocolatey or on the master branch on Github, but you can get a taste of how it looks and feels by installing the nightly build or building from dev branch directly.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a quick look together.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>IHttpActionResult – new way of creating responses in ASP.NET Web API 2</title>
      <link>https://www.strathweb.com/2013/06/ihttpactionresult-new-way-of-creating-responses-in-asp-net-web-api-2/</link>
      <pubDate>Sun, 30 Jun 2013 09:44:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/06/ihttpactionresult-new-way-of-creating-responses-in-asp-net-web-api-2/</guid>
      <description>&lt;p&gt;In the first version of Web API, you had two ways of creating response from an API action. Either return a specific object instance (or void) and let the Web API pipeline convert that to an &lt;em&gt;HttpResponseMessage&lt;/em&gt; for you, or return a raw &lt;em&gt;HttpResponseMessage&lt;/em&gt;. In that case, you had to construct it manually, and you bypassed all of the internal Web API mechanisms (formatters, content negotiation).&lt;/p&gt;
&lt;p&gt;Now in Web API 2 (which was just released in beta) we get a third option, which is &lt;em&gt;IHttpActionResult&lt;/em&gt;. It&amp;rsquo;s very simple, yet extremely powerful - so let&amp;rsquo;s explore it in this blog post.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Overriding filters in ASP.NET Web API vNext</title>
      <link>https://www.strathweb.com/2013/06/overriding-filters-in-asp-net-web-api-vnext/</link>
      <pubDate>Sun, 16 Jun 2013 15:26:33 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/06/overriding-filters-in-asp-net-web-api-vnext/</guid>
      <description>&lt;p&gt;One of the more annoying issues in the current version of ASP.NET Web API, is that it&amp;rsquo;s very difficult to override global/controller scoped filters at action level.&lt;/p&gt;
&lt;p&gt;Perhaps you may have logging functionality or authorization filters, that you want to apply globally, and only exclude certain actions from participating in this process.&lt;/p&gt;
&lt;p&gt;This problem is remedied in Web API vNext (version 5), and you can try that out with nightly builds.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Supporting only JSON in ASP.NET Web API – the right way</title>
      <link>https://www.strathweb.com/2013/06/supporting-only-json-in-asp-net-web-api-the-right-way/</link>
      <pubDate>Mon, 03 Jun 2013 13:28:21 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/06/supporting-only-json-in-asp-net-web-api-the-right-way/</guid>
      <description>&lt;p&gt;Sometimes (or perhaps, quite often?) you only need to support JSON in your ASP.NET Web API. In these cases, the ability of Web API pipeline to facilitate various media types is of no value for you - and you probably do not care at all about content negotiation.&lt;/p&gt;
&lt;p&gt;In such situations it is often suggested to remove other media type formatters and only leave &lt;em&gt;JsonMediaTypeFormatter&lt;/em&gt;. In fact, the author of this blog has earned almost 20 StackOverflow points for &lt;a href=&#34;http://stackoverflow.com/questions/12629144/how-to-force-asp-net-web-api-to-always-return-json/12629311#12629311&#34;&gt;this type of suggestion&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;However, there is even better way to solve this problem, and you&amp;rsquo;ll love it if you are into micro-optimizations.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Retrieving the client’s IP address in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/05/retrieving-the-clients-ip-address-in-asp-net-web-api/</link>
      <pubDate>Thu, 23 May 2013 09:46:36 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/05/retrieving-the-clients-ip-address-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;One of the common tasks, for logging or authorization purposes, is to obtain the IP address of the client accessing your Web API.&lt;/p&gt;
&lt;p&gt;There are different ways to achieve this depending on whether you are web hosting (through &lt;em&gt;HttpContext&lt;/em&gt;) or whether you are self hosting (through WCF&amp;rsquo;s &lt;em&gt;RemoteEndpointMessageProperty&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;To avoid the redundant code, we can unify those approaches under a single extension method, which you can use across all your projects.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>scriptcs and using Azure Mobile Services from your scripts</title>
      <link>https://www.strathweb.com/2013/05/scriptcs-and-using-azure-mobile-services-from-your-scripts/</link>
      <pubDate>Mon, 13 May 2013 03:33:40 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/05/scriptcs-and-using-azure-mobile-services-from-your-scripts/</guid>
      <description>&lt;p&gt;Hopefully by now you have already heard about the &lt;a href=&#34;http://github.com/scriptcs&#34;&gt;sriptcs&lt;/a&gt; project, which allows you to write script based applications with C# and Nuget.&lt;/p&gt;
&lt;p&gt;If not, have a look at the &lt;a href=&#34;https://github.com/scriptcs/scriptcs&#34;&gt;readme&lt;/a&gt; and the great &lt;a href=&#34;http://www.hanselman.com/blog/ProjectlessScriptedCWithScriptCSAndRoslyn.aspx&#34;&gt;introduction post&lt;/a&gt; by Scott Hanselman to get started.&lt;/p&gt;
&lt;p&gt;Actually, just today, we have released &lt;a href=&#34;http://chocolatey.org/packages/ScriptCs/&#34;&gt;v.0.4 of scriptcs&lt;/a&gt;! To celebrate that, let&amp;rsquo;s revisit one of our favorite topics - Azure Mobile Services - and how you can use it with &lt;em&gt;scriptcs&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API and greedy query string parameter binding</title>
      <link>https://www.strathweb.com/2013/04/asp-net-web-api-and-greedy-query-string-parameter-binding/</link>
      <pubDate>Sun, 28 Apr 2013 16:05:00 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/04/asp-net-web-api-and-greedy-query-string-parameter-binding/</guid>
      <description>&lt;p&gt;Following the last article &lt;a href=&#34;https://www.strathweb.com/2013/04/asp-net-web-api-parameter-binding-part-1-understanding-binding-from-uri/&#34;&gt;on parameter binding from URI&lt;/a&gt;, I received an interesting question - &amp;ldquo;what if I wanted to prevent binding parameters from query string and only allow binding from route values&amp;rdquo;? In other words, prevent passing values to actions via query strings and only look for them in the route itself (to avoid duplicate ways of reaching the same endpoint).&lt;/p&gt;
&lt;p&gt;This is possible in Web API - let&amp;rsquo;s explore how you&amp;rsquo;d go about implementing it.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API parameter binding part 1 – Understanding binding from URI</title>
      <link>https://www.strathweb.com/2013/04/asp-net-web-api-parameter-binding-part-1-understanding-binding-from-uri/</link>
      <pubDate>Thu, 18 Apr 2013 06:56:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/04/asp-net-web-api-parameter-binding-part-1-understanding-binding-from-uri/</guid>
      <description>&lt;p&gt;Today, let&amp;rsquo;s kick off a series intended to look at different aspects of HTTP parameter binding in ASP.NET Web API. Why? Aside from the awesome series by &lt;a href=&#34;http://blogs.msdn.com/b/jmstall/archive/2012/05/11/webapi-parameter-binding-under-the-hood.aspx&#34;&gt;Mike Stall&lt;/a&gt;, there isn&amp;rsquo;t really that much material on the web on this particular subject. And developers coming from MVC background, often get surprised by differences in the model binding mechanism between MVC and Web API.&lt;/p&gt;
&lt;p&gt;In this first post, let&amp;rsquo;s have a brief overview of parameter binding in Web API and then specifically look at binding model from URI.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Collaborative route planner with SignalR, Knockout.js and Google Maps</title>
      <link>https://www.strathweb.com/2013/04/collaborative-route-planner-with-signalr-knockout-js-and-google-maps/</link>
      <pubDate>Thu, 11 Apr 2013 20:43:17 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/04/collaborative-route-planner-with-signalr-knockout-js-and-google-maps/</guid>
      <description>Today I have published a new article over at my friends from Tech.pro. This time, we continue on the topic of SignalR &amp;amp; Knockout.js, and look at implementing a real-time collaborative route planner with the use of Google Maps API. Hopefully you&amp;rsquo;ll enjoy the article as much as I enjoyed writing it.
These libraries, really make a lot the development tasks feel like true magic!
As you usually, the source code is on GitHub.</description>
    </item>
    
    <item>
      <title>Hosting ASP.NET Web API in LinqPad</title>
      <link>https://www.strathweb.com/2013/04/hosting-asp-net-web-api-in-linqpad/</link>
      <pubDate>Fri, 05 Apr 2013 02:56:54 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/04/hosting-asp-net-web-api-in-linqpad/</guid>
      <description>&lt;p&gt;Today I stumbled upon an interesting Stackoverflow question, where the user was asking how to go about &lt;a href=&#34;http://stackoverflow.com/questions/14042213/using-webapi-in-linqpad/&#34;&gt;self-hosting Web API in LinqPad&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The question has gone unanswered since December, and I&amp;rsquo;m guessing even the OP forgot about it. However, I&amp;rsquo;d like to elaborate a bit about the topic. You certainly can host Web API in LinqPad, provided you plug in a quick work around - and we actually did hit a similar issue with &lt;a href=&#34;https://github.com/scriptcs/&#34;&gt;scriptcs&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Per request error detail policy in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/03/per-request-error-detail-policy-in-asp-net-web-api/</link>
      <pubDate>Tue, 26 Mar 2013 04:17:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/03/per-request-error-detail-policy-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;ASP.NET Web API does a really good job at letting you control the amount of error details returned in the framework responses. And that is for both your own (&amp;ldquo;developer-generated&amp;rdquo;) exceptions, as well as the ones produced by the Web API itself.&lt;/p&gt;
&lt;p&gt;However, this setting (&lt;em&gt;IncludeErrorDetailPolicy&lt;/em&gt;) is global, and configured against the &lt;em&gt;HttpConfiguration&lt;/em&gt;, making runtime manipulation of the error detail policy rather difficult.&lt;/p&gt;
&lt;p&gt;However there is a trick you can use.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Shopping cart with SignalR, ASP.NET Web API and Knockout.js</title>
      <link>https://www.strathweb.com/2013/03/shopping-cart-with-signalr-asp-net-web-api-and-knockout-js/</link>
      <pubDate>Thu, 21 Mar 2013 18:34:29 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/03/shopping-cart-with-signalr-asp-net-web-api-and-knockout-js/</guid>
      <description>I have published an article at Tech.pro today, about building a real-time shopping cart with some of our favorite technologies - ASP.NET Web API, SignalR and Knockout.js (or, as Brad would say, with the &amp;ldquo;Webstack of Love&amp;rdquo;).
Click here to head over there and read the article!</description>
    </item>
    
    <item>
      <title>Leveraging Roslyn to author ASP.NET Web API without recompiling</title>
      <link>https://www.strathweb.com/2013/03/leveraging-roslyn-to-author-asp-net-web-api-without-recompiling/</link>
      <pubDate>Sat, 16 Mar 2013 17:10:31 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/03/leveraging-roslyn-to-author-asp-net-web-api-without-recompiling/</guid>
      <description>&lt;p&gt;Some time ago I posted a &lt;a href=&#34;https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/&#34;&gt;mini-series of posts&lt;/a&gt; about using Roslyn to script Web API, and that has gotten some great response. In that original post, I mentioned &amp;amp; used, without going into too much details, a very useful &amp;ldquo;compiler as a service&amp;rdquo; feature Roslyn offers.&lt;/p&gt;
&lt;p&gt;Recently, &lt;a href=&#34;https://twitter.com/gblock&#34;&gt;Glenn Block&lt;/a&gt; started a very exciting project called &lt;a href=&#34;https://github.com/scriptcs/scriptcs/tree/dev&#34;&gt;scriptcs&lt;/a&gt; (which now &lt;a href=&#34;https://twitter.com/jrusbatch&#34;&gt;Justin Rusbtach&lt;/a&gt; and I happen to be a part of too) to provide a seamless/node.js-esque scripting experience for C# and in that project we indeed leverage on Roslyn heavily - to do some behind the scenes tricks to hide the compilation aspect from the user, so that it really resembles pure script execution.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Adding HTTP HEAD support to ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/03/adding-http-head-support-to-asp-net-web-api/</link>
      <pubDate>Mon, 11 Mar 2013 02:27:42 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/03/adding-http-head-support-to-asp-net-web-api/</guid>
      <description>&lt;p&gt;HEAD HTTP verb is defined in &lt;a href=&#34;http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html&#34;&gt;RFC 2616&lt;/a&gt; as &amp;ldquo;identical to GET except that the server MUST NOT return a message-body in the response.&amp;rdquo; As such you can think of it as a twin brother of GET.&lt;/p&gt;
&lt;p&gt;There are a lot of use cases for HEAD: pinging without the overhead of transferring data, or simply requesting information about the size of a resource (which can be used to provide download progress bar), just to name a few.&lt;/p&gt;
&lt;p&gt;Unfortunately, out of the box, ASP.NET Web API doesn&amp;rsquo;t provide a mechanism of supporting HEAD or coupling GET &amp;amp; HEAD.&lt;/p&gt;
&lt;p&gt;We can work around that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API and Protocol Buffers</title>
      <link>https://www.strathweb.com/2013/02/asp-net-web-api-and-protocol-buffers/</link>
      <pubDate>Sun, 24 Feb 2013 21:22:52 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/02/asp-net-web-api-and-protocol-buffers/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://developers.google.com/protocol-buffers/docs/overview&#34;&gt;Protocol Buffers&lt;/a&gt; are a super efficient and very flexible way of serializing structured data. Developed at Google, provide the developers lightspeed serialization and deserialization capabilities.&lt;/p&gt;
&lt;p&gt;There a handful of .NET implementations, the most popular one, called &lt;a href=&#34;http://code.google.com/p/protobuf-net/&#34;&gt;protobuf-net&lt;/a&gt;, created by Marc Gravell from StackExchange. On top of that library, &lt;a href=&#34;https://github.com/WebApiContrib&#34;&gt;WebApiContrib&lt;/a&gt; project has a Web API Protocol Buffers formatter ready for you to plug in.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>SignalR, ActionFilters and ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/02/signalr-actionfilters-and-asp-net-web-api/</link>
      <pubDate>Mon, 18 Feb 2013 19:18:15 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/02/signalr-actionfilters-and-asp-net-web-api/</guid>
      <description>&lt;p&gt;There have been quite a few examples circulating on the web on how one would use SignalR together with Web API. It all started after Brad Wilson had a &lt;strong&gt;great&lt;/strong&gt; example on calling SignalR from API controllers at &lt;a href=&#34;http://vimeo.com/43603472&#34;&gt;NDC Oslo 2012&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Even on &lt;a href=&#34;https://www.strathweb.com/2012/11/realtime-asp-net-web-api-tracing-with-signalr&#34;&gt;this blog&lt;/a&gt; we looked at calling SignalR from Web API &lt;em&gt;ITraceWriter&lt;/em&gt; to provide realtime tracing capabilities.&lt;/p&gt;
&lt;p&gt;How about, to avoid any controller-level noise, messaging the connected SignalR subscribers from ActionFilters? While this approach might not be applicable in all scenarios, when it is, I think it could provide a nice layer of separation.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>But I don’t want to call Web Api controllers “Controller”!</title>
      <link>https://www.strathweb.com/2013/02/but-i-dont-want-to-call-web-api-controllers-controller/</link>
      <pubDate>Tue, 12 Feb 2013 04:03:28 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/02/but-i-dont-want-to-call-web-api-controllers-controller/</guid>
      <description>&lt;p&gt;A friend of mine was recently complaining about how Web API controller centric approach doesn&amp;rsquo;t really make sense, and that he prefers feature-oriented endpoints. While - in all honesty - I am not sure what he means by that, it got me thinking. Maybe, if we didn&amp;rsquo;t have to suffix Web API controllers &amp;ldquo;Controller&amp;rdquo;, that would make him happy?&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building Web API Visual Studio support tools with Roslyn</title>
      <link>https://www.strathweb.com/2013/02/building-web-api-visual-studio-support-tools-with-roslyn/</link>
      <pubDate>Sun, 03 Feb 2013 18:57:59 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/02/building-web-api-visual-studio-support-tools-with-roslyn/</guid>
      <description>&lt;p&gt;In my humble opinion, Microsoft Roslyn is one of the most exciting things on the .NET stack. One of the many (MANY) things you can do easily with Roslyn, is write your own development-time code analysis tools.&lt;/p&gt;
&lt;p&gt;We have talked about Roslyn scripting capabilities &lt;a href=&#34;https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/&#34;&gt;on this blog&lt;/a&gt; before (&lt;a href=&#34;https://www.strathweb.com/2012/10/scripting-web-api-self-host-with-roslyn-ctp-part-2/&#34;&gt;twice actually&lt;/a&gt;). Let&amp;rsquo;s look at code analysis today and see how we could built tools that could help Web API developers build nice clean HTTP services.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Adding Request.IsLocal to ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/01/adding-request-islocal-to-asp-net-web-api/</link>
      <pubDate>Wed, 23 Jan 2013 02:45:19 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/01/adding-request-islocal-to-asp-net-web-api/</guid>
      <description>&lt;p&gt;I was recently asked how to filter out local requests in Web API. Indeed, one of the more useful things that developers got used to work with in traditional ASP.NET (and the &lt;em&gt;System.Web.dll&lt;/em&gt;) was the ability to quickly check if a given request is a local one or not - by simply calling the &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/system.web.httprequest.islocal.aspx&#34;&gt;IsLocal&lt;/a&gt; boolean property on &lt;em&gt;HttpRequest&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;This has been omitted from &lt;em&gt;HttpRequestMessage&lt;/em&gt; in the new HTTP object model, around which Web API is built, but Web API still keeps track of that information under the hood, so you can easily write a simple extension method to bring back the old familiar syntax.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Magical Web API action selector – HTTP-verb and action name dispatching in a single controller</title>
      <link>https://www.strathweb.com/2013/01/magical-web-api-action-selector-http-verb-and-action-name-dispatching-in-a-single-controller/</link>
      <pubDate>Thu, 17 Jan 2013 00:43:08 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/01/magical-web-api-action-selector-http-verb-and-action-name-dispatching-in-a-single-controller/</guid>
      <description>&lt;p&gt;If you follow Web API on &lt;a href=&#34;http://aspnet.uservoice.com/forums/147201-asp-net-web-api&#34;&gt;User Voice&lt;/a&gt; or track &lt;a href=&#34;http://aspnetwebstack.codeplex.com/workitem/list/basic?field=Votes&amp;amp;direction=Descending&amp;amp;issuesToDisplay=Open&amp;amp;keywords=&amp;amp;emailSubscribedItemsOnly=false&#34;&gt;Web API issues on Codeplex&lt;/a&gt;, you&amp;rsquo;d probably know that one of the most popular requested features of Web API is to allow the developers to combine HTTP verb action dispatching (default one), with action-name based dispatching in a single controller.&lt;/p&gt;
&lt;p&gt;The rationale is very obvious, and I&amp;rsquo;m pretty sure there is not a single Web API developer in the world, who hasn&amp;rsquo;t run into this problem - by not being allowed to combine these, whenever you want to create a nested resource, you need to add a new controller and manually register a funky nested route to facilitate it.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s create a custom action selector to solve this.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Easy ASP.NET Web API resource updates with Delta</title>
      <link>https://www.strathweb.com/2013/01/easy-asp-net-web-api-resource-updates-with-delta/</link>
      <pubDate>Fri, 11 Jan 2013 15:23:54 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/01/easy-asp-net-web-api-resource-updates-with-delta/</guid>
      <description>&lt;p&gt;One of the great features of the &lt;em&gt;Microsoft ASP.NET WebAPI OData&lt;/em&gt; package (which you can grab as prerelease from Nuget, and which will soon, in next release cycle, become part of Web API core) is a little dynamic proxy object called &lt;em&gt;Delta&lt;T&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;It allows you to perform ridiculously easy mapping of properties between the model obtained from the database and the model passed by the client - thus facilitating all kinds of update scenarios your application may encounter.&lt;/p&gt;
&lt;p&gt;Unfortunately, it will not work for you - unless you commit to &lt;em&gt;ODataMediaTypeFormatter&lt;/em&gt; and all the extravaganza related to OData. What if you want to use the traditional API formatters, but still leverage on the power of &lt;em&gt;Delta&lt;T&gt;&lt;/em&gt;?&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how you can perform really smooth full (PUT) and partial (PATCH) updates of your resources in Web API.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Replace JSON.NET with ServiceStack.Text in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/01/replace-json-net-with-servicestack-text-in-asp-net-web-api/</link>
      <pubDate>Sun, 06 Jan 2013 19:53:08 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/01/replace-json-net-with-servicestack-text-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;I recently stumbled across a [comparison of JSON serialization libraries][1]. which shows that ServiceStack.Text by far outperforms any of the competitors. Indeed, the folks down at [ServiceStack][2] have been building a lot of great stuff for the past few (4?) years to facilitate their framework.&lt;br&gt;
ServiceStack.Text is available [on Nuget][3] and can be used outside of ServiceStack, within any .NET project, so why not use it with Web API, replacing the default serializer, JSON.NET?&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s do that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Asynchronously streaming video with ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/01/asynchronously-streaming-video-with-asp-net-web-api/</link>
      <pubDate>Thu, 03 Jan 2013 23:19:32 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/01/asynchronously-streaming-video-with-asp-net-web-api/</guid>
      <description>&lt;p&gt;A lot of people think that ASP.NET Web API is basically a fancy framework for building APIs - which couldn&amp;rsquo;t be further from the truth. Web API is mainly about the new .NET &lt;em&gt;HTTP programming model&lt;/em&gt; it brings to the table - embracing HTTP to perform a whole magnitude of web related tasks; and APIs are just a small portion of that. Hopefully if you follow this blog, you have seen examples of that already, as we often wander in the unkown areas of ASP.NET Web API, beyond building &amp;ldquo;traditional&amp;rdquo; APIs.&lt;/p&gt;
&lt;p&gt;Today, let&amp;rsquo;s go back to the HTTP programming model and use Web API to asynchronously stream videos.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Extending Web API Help Page with information from attributes</title>
      <link>https://www.strathweb.com/2012/11/extending-web-api-help-page-with-information-from-attributes/</link>
      <pubDate>Fri, 30 Nov 2012 02:52:12 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/11/extending-web-api-help-page-with-information-from-attributes/</guid>
      <description>&lt;p&gt;Web API help page, available for your Web API via the &lt;a href=&#34;http://nuget.org/packages/Microsoft.AspNet.WebApi.HelpPage&#34;&gt;Nuget package&lt;/a&gt; or built into the Web API template if you used the ASP.NET Fall Preview &lt;a href=&#34;http://www.asp.net/vnext&#34;&gt;installer&lt;/a&gt;, is an extremely useful tool for documenting your API. That is, both for the external users that will consume the API, but also for your own development team, especially if the API is part of a larger internal ecosystem of applications and you need an automated, quick and easy reference for everyone to be able to look at.&lt;/p&gt;
&lt;p&gt;Recently, I have been asked how you could automate the exposure of some additional information about the API, such as whether an action requires authorization or what are the potential response status codes.&lt;/p&gt;
&lt;p&gt;And sure enough, it is very easy to do.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Realtime ASP.NET Web API tracing with SignalR</title>
      <link>https://www.strathweb.com/2012/11/realtime-asp-net-web-api-tracing-with-signalr/</link>
      <pubDate>Fri, 23 Nov 2012 03:17:49 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/11/realtime-asp-net-web-api-tracing-with-signalr/</guid>
      <description>&lt;p&gt;The latest ASP.NET Fall Update, released recently, introduced the Web API tracing package into the Web API core. It is the default implementation of &lt;em&gt;ITraceWriter&lt;/em&gt;, built around the &lt;em&gt;System.Diagnostics&lt;/em&gt;, allowing you to easily trace what&amp;rsquo;s going on inside your API and output that into the debugger&amp;rsquo;s console.&lt;/p&gt;
&lt;p&gt;On this very blog, we discussed a similar approach a couple of months ago already, by building an &lt;a href=&#34;https://www.strathweb.com/2012/06/using-nlog-to-provide-custom-tracing-for-your-asp-net-web-api/&#34;&gt;NLog powered trace writer&lt;/a&gt; for your Web API.&lt;/p&gt;
&lt;p&gt;Today, let&amp;rsquo;s take all this a step further, and build something much more exciting - a realtime Web API trace, powered by SignalR.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API and dependencies in request scope</title>
      <link>https://www.strathweb.com/2012/11/asp-net-web-api-and-dependencies-in-request-scope/</link>
      <pubDate>Thu, 15 Nov 2012 03:15:36 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/11/asp-net-web-api-and-dependencies-in-request-scope/</guid>
      <description>&lt;p&gt;Regardless of what types of applications you are building with Web API, sooner or later you will run into a situation where you need to scope certain dependencies to the lifetime of a web request.&lt;/p&gt;
&lt;p&gt;Examples of these types of in request scope dependencies could be loggers, unit of work implementations, NHibernate session, RavenDB session, Mindscape Lightspeed UnitOfWork or many other. Fortunately, this is very easy to do with Web API and an IoC container.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Adding Session support to ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/11/adding-session-support-to-asp-net-web-api/</link>
      <pubDate>Fri, 09 Nov 2012 04:11:36 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/11/adding-session-support-to-asp-net-web-api/</guid>
      <description>&lt;p&gt;First the disclaimer. Yes, there are &lt;a href=&#34;http://brockallen.com/2012/04/07/think-twice-about-using-session-state/&#34;&gt;a lot of problems&lt;/a&gt; with using session in your ASP.NET applications. Moreover, by default, HTTP (and by extension, REST) is stateless - and as a result &lt;em&gt;each HTTP request should carry enough information by itself for its recipient to process it to be in complete harmony with the stateless nature of HTTP&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;So if you are designing a proper API, if you are a REST purist, or if you are &lt;a href=&#34;https://twitter.com/darrel_miller&#34;&gt;Darrel Miller&lt;/a&gt;, you definitely do not want to continue reading this article. But if not, and you find yourself in a scenario requiring session - perhaps you are using Web API to facilitate your JS or MVC application, and you want to sync the state of Web API with the state of MVC easily, or you simply want a quick and easy way to persist state on the server side - this article is for you.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Fall 2012 update (preview) is out – what’s new for Web API developers?</title>
      <link>https://www.strathweb.com/2012/11/asp-net-fall-2012-update-preview-is-out-whats-new-for-web-api-developers/</link>
      <pubDate>Thu, 01 Nov 2012 03:56:51 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/11/asp-net-fall-2012-update-preview-is-out-whats-new-for-web-api-developers/</guid>
      <description>&lt;p&gt;This evening, Microsoft has released a &lt;a href=&#34;www.asp.net/vnext&#34;&gt;Fall 2012 Update&lt;/a&gt; to ASP.NET. The release brings a whole set of goodies for ASP.NET developers, including SignalR (now officially part of ASP.NET), C# FB app project template, Windows Azure Authentication and more. Jon Galloway has the updates very nicely summarized &lt;a href=&#34;http://weblogs.asp.net/jgalloway/archive/2012/10/31/ten-oh-wait-eleven-eleven-things-you-should-know-about-the-asp-net-fall-2012-update.aspx#.UJHGq9TegYo.twitter&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Of course, as you&amp;rsquo;d expect, there are plenty of updates regarding Web API. Let&amp;rsquo;s have a look at them.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Clean up your Web API controllers with model validation and null check filters</title>
      <link>https://www.strathweb.com/2012/10/clean-up-your-web-api-controllers-with-model-validation-and-null-check-filters/</link>
      <pubDate>Wed, 24 Oct 2012 01:42:12 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/10/clean-up-your-web-api-controllers-with-model-validation-and-null-check-filters/</guid>
      <description>&lt;p&gt;Regardless of what kind of applications you build with Web API, you are bound to write a lot of similar code in many of your actions - to check if the model is valid and to check if the submitted object is null.&lt;/p&gt;
&lt;p&gt;This creates unnecessary noise and repetition. In this short blog post, let&amp;rsquo;s have a quick at how you can delegate this kind of repetitive logic to Web API filters.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Send text messages (SMS) from Web API using Azure Mobile Services</title>
      <link>https://www.strathweb.com/2012/10/send-text-messages-sms-from-web-api-using-azure-mobile-services/</link>
      <pubDate>Wed, 17 Oct 2012 01:52:17 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/10/send-text-messages-sms-from-web-api-using-azure-mobile-services/</guid>
      <description>&lt;p&gt;Few weeks ago, &lt;a href=&#34;https://www.strathweb.com/2012/09/using-azure-mobile-services-in-your-web-apps-through-asp-net-web-api/&#34;&gt;I blogged&lt;/a&gt; about using Azure Mobile Services in your Web API applications and I think I managed to convince some of you that ZUMO with its REST-style API is really useful and super easy to work with.&lt;/p&gt;
&lt;p&gt;The guys at Azure Mobile Services are not slowing down at all. Today Scott Gu announced a whole new &lt;a href=&#34;http://weblogs.asp.net/scottgu/archive/2012/10/16/windows-azure-mobile-services-new-support-for-ios-apps-facebook-twitter-google-identity-emails-sms-blobs-service-bus-and-more.aspx&#34;&gt;super cool set of upgrades&lt;/a&gt;, and one of the coolest features is the integration to Twillio and the ability to send text messages (SMS) directly from the ZUMO script.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s go ahead and extend our previous ZUMO example (managing a list of sports team) with SMS messaging.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Remote printing with ASP.NET Web API in Windows Service</title>
      <link>https://www.strathweb.com/2012/10/remote-printing-with-asp-net-web-api-in-windows-service/</link>
      <pubDate>Sun, 14 Oct 2012 17:06:01 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/10/remote-printing-with-asp-net-web-api-in-windows-service/</guid>
      <description>&lt;p&gt;We all have different devices at home, right? So I had this idea, why not make a small Web API driven Windows service to sit on my main machine, to which I can send documents, which in turn will send them to the printer and print out. Sounds great doesn&amp;rsquo;t it?&lt;/p&gt;
&lt;p&gt;Since Web API self host can be without any problems hosted as Windows Service, the whole application is really simple to put together. Let&amp;rsquo;s do that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Use Web API as a dynamic runtime Typescript compiler</title>
      <link>https://www.strathweb.com/2012/10/use-web-api-as-a-dynamic-runtime-typescript-compiler/</link>
      <pubDate>Mon, 08 Oct 2012 04:38:07 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/10/use-web-api-as-a-dynamic-runtime-typescript-compiler/</guid>
      <description>&lt;p&gt;There’s been a lot of community buzz about Typescript recently – and rightfully so – as it solves a lot of Javascript’s issues, and despite being in its infancy, shows a tremendous amount of potential already.&lt;/p&gt;
&lt;p&gt;One of the features (or side effects, depending on how you look at it) of Typescript, is that your are required to compile your code, to produce JS output. Sure, it is possible to dynamically compile Typescript in the browser (using its JS compiler), but that requires you to reference Typescript.js which is roughly 250 kB, and might be a tough pill to swallow.&lt;/p&gt;
&lt;p&gt;However, using the ASP.NET Swiss army knife called Web API, and an approach we already disuussed on this blog &lt;a href=&#34;http://www.strathweb.com/2012/09/generate-kindle-mobi-ebooks-with-your-asp-net-web-api/&#34;&gt;before&lt;/a&gt;, let me show you how you can quite smoothly leverage on Web API pipeline to dynamically compile your Typescript code into Javascript at runtime.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Scripting Web API self host with Roslyn CTP – Part 2</title>
      <link>https://www.strathweb.com/2012/10/scripting-web-api-self-host-with-roslyn-ctp-part-2/</link>
      <pubDate>Wed, 03 Oct 2012 00:58:30 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/10/scripting-web-api-self-host-with-roslyn-ctp-part-2/</guid>
      <description>&lt;p&gt;This is part two of the series - if you haven&amp;rsquo;t read part one &lt;a href=&#34;https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/&#34;&gt;check it out&lt;/a&gt; before proceeding.&lt;/p&gt;
&lt;p&gt;Last time we did some cool stuff with using C# script files to instantiate a working Web API server - by executing them with RCSI and C# interactive window.&lt;/p&gt;
&lt;p&gt;In part two, let&amp;rsquo;s use Roslyn to build our own scripting application (custom C# console), which will act as an input window for the user; user will be able type C# code that&amp;rsquo;s supposed to be executed and run it (something that services such as &lt;a href=&#34;https://compilify.net/&#34;&gt;Compilify&lt;/a&gt; offer). We will expose Web API assemblies in that context, allowing the user to type in the code required for the Web API server to be run.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Scripting Web API self host with Roslyn CTP – Part 1</title>
      <link>https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/</link>
      <pubDate>Thu, 27 Sep 2012 10:46:06 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/</guid>
      <description>&lt;p&gt;If you follow me on &lt;a href=&#34;https://twitter.com/filip_woj&#34;&gt;Twitter&lt;/a&gt; you probably already know that recently I&amp;rsquo;ve been playing around with &lt;a href=&#34;http://en.wikipedia.org/wiki/Microsoft_Roslyn&#34;&gt;Roslyn&lt;/a&gt;. If you don&amp;rsquo;t know about Roslyn, in very short, you can think of it as &amp;ldquo;compiler as a service&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;There is a whole plethora of stuff that Roslyn allows us to do, one of the coolest being the scripting API - enabling us to use C# as a script language (think i.e. Perl or Python). So I had this idea, why not script a fully functional web server through Web API self host?&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Generate Kindle (MOBI) ebooks with your ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/09/generate-kindle-mobi-ebooks-with-your-asp-net-web-api/</link>
      <pubDate>Sun, 16 Sep 2012 18:36:25 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/09/generate-kindle-mobi-ebooks-with-your-asp-net-web-api/</guid>
      <description>&lt;p&gt;Recently, I&amp;rsquo;ve been working a little on an application that allows users to save, tag, bookmark links for later reading - that kind of stuff. Obviously, Web API facilitates those types of apps really well, as data can be exposed in a magnitude of formats. So I had this crazy idea - CLR to Kindle? Why not.&lt;/p&gt;
&lt;p&gt;Unfortunately MOBI format (used by Kindle) is not that easy to support from C#, as to my knowledge there is no ready-made DLL port or SDK available. On the other hand, Amazon has created a proprietary tool called [Kindlegen][1], which is a command line tool, and allows you to convert HTML into MOBI. We&amp;rsquo;ll use that - it&amp;rsquo;s a hacky solution but it sure is a lot of fun.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Boost up your ASP.NET Web API with MessagePack</title>
      <link>https://www.strathweb.com/2012/09/boost-up-your-asp-net-web-api-with-messagepack/</link>
      <pubDate>Mon, 10 Sep 2012 19:57:35 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/09/boost-up-your-asp-net-web-api-with-messagepack/</guid>
      <description>&lt;p&gt;A while ago I blogged about [supporting BSON][1] at your Web API end points. A good alternative to both JSON and BSON has, for quite a while now, been [MessagePack][2].&lt;/p&gt;
&lt;p&gt;The main problem with supporting MessagePack in your Web API has been the fact that MessagePack required a strongly typed serializer (in other words, you needed to tell the serializer what type you serialize and deserialize at compile time). There was no easy way to provide support for boxed objects (untyped context) - and Web API media type formatters run against such generic &lt;em&gt;object&lt;/em&gt; instances. In face, to be precise, writing to a stream (serializing) has never been a big problem, but reading was very complicated. An easy solution was a type whitelist and a massive if-else block, but such approaches are hardly good ideas.&lt;/p&gt;
&lt;p&gt;Four days ago, Yusuke Fujiwara, one of the wizards behind MessagePack for CLI, [added support][3] for untyped serializer factory, effectively inviting all of us to start using MessagePack in Web API.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using Azure Mobile Services in your web apps through ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/09/using-azure-mobile-services-in-your-web-apps-through-asp-net-web-api/</link>
      <pubDate>Mon, 03 Sep 2012 10:26:52 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/09/using-azure-mobile-services-in-your-web-apps-through-asp-net-web-api/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.windowsazure.com/en-us/develop/mobile/&#34;&gt;Azure Mobile Services&lt;/a&gt; is the latest cool thing in town, and if you haven&amp;rsquo;t checked it out already I really recommend you do, i.e. in this &lt;a href=&#34;http://weblogs.asp.net/scottgu/archive/2012/08/28/announcing-windows-azure-mobile-services.aspx&#34;&gt;nice introduction post&lt;/a&gt; by Scott Gu. In short, it allows you to save/retrieve data in and out of dynamic tables (think no-schema) directly from the cloud. This makes it a perfect data storage solution for mobile apps, but why not use it in other scenarios as well?&lt;/p&gt;
&lt;p&gt;For now Azure Mobile Services (a.k.a. ZUMO) is being advertised for Windows 8 only (the SDK is targeted for Windows 8 applications), but there is no reason why you couldn&amp;rsquo;t use it elsewhere.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s do that and use Web API as a proxy.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>A guide to asynchronous file uploads in ASP.NET Web API RTM</title>
      <link>https://www.strathweb.com/2012/08/a-guide-to-asynchronous-file-uploads-in-asp-net-web-api-rtm/</link>
      <pubDate>Wed, 29 Aug 2012 14:06:25 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/08/a-guide-to-asynchronous-file-uploads-in-asp-net-web-api-rtm/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s been 2 weeks since Web API has been released, and in a post &lt;a href=&#34;https://www.strathweb.com/2012/08/asp-net-web-api-is-released-whats-new-in-web-api-rtm-and-how-to-use-it/&#34;&gt;highlighting the changes&lt;/a&gt;, I mentioned I will write an updated tutorial on file upload.&lt;/p&gt;
&lt;p&gt;File upload is quite an important topic for Web API endpoitns or for API-driven applications, and sure enough there are some nice changes to the MultiPartFormDataStreamProvider, which, contrary to its versions in the Beta and RC allow easy and flexible model for dealing with uploaded data. On the other hand, these changes between Beta-RC-RTM, mean many of the upload-related posts found in the Web API community (this blog included) no longer work properly.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how you could &lt;em&gt;now&lt;/em&gt; upload files to your ASP.NET Web API.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Supporting OData $inlinecount with the new Web API OData preview package</title>
      <link>https://www.strathweb.com/2012/08/supporting-odata-inlinecount-with-the-new-web-api-odata-preview-package/</link>
      <pubDate>Thu, 23 Aug 2012 11:43:02 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/08/supporting-odata-inlinecount-with-the-new-web-api-odata-preview-package/</guid>
      <description>&lt;p&gt;OData support in Web API is arguably one of its hottest features. However, it&amp;rsquo;s support in Web API has been a bumpy ride - initially, OData was supported in a limited way only, and ultimately ended up being yanked altogether from the Web API RTM. It is however stil lpossible to use OData with Web API, only in a slighly different form , as an [external NuGet package][1], which, in its pre-release alpha format was published last Wednesday, along the Web API RTM release.&lt;/p&gt;
&lt;p&gt;This package is called &lt;strong&gt;Microsoft ASP.NET Web API OData&lt;/strong&gt; and is a joint effort by Microsoft&amp;rsquo;s Web API and OData teams. Alex James has written a [great introduction][2] to the package, so I recommend reading it.&lt;/p&gt;
&lt;p&gt;In the meantime, let me show you how to add $inlinecount support as for the time being, it&amp;rsquo;s still not provided there out of the box.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API is released! What’s new in Web API RTM and how to use it!</title>
      <link>https://www.strathweb.com/2012/08/asp-net-web-api-is-released-whats-new-in-web-api-rtm-and-how-to-use-it/</link>
      <pubDate>Wed, 15 Aug 2012 17:32:46 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/08/asp-net-web-api-is-released-whats-new-in-web-api-rtm-and-how-to-use-it/</guid>
      <description>&lt;p&gt;If you have been following this blog for a while now (and if not, I really hope you will!), you&amp;rsquo;d know that I am a big fan of Web API. I have been blogging a lot about Web API, through its beta, RC stages and even about features that were only available through the Codeplex builds and I have to say that it is a terrific bridge between CLR and HTTP and fits really nicely into the existing landspace of web technologies.&lt;/p&gt;
&lt;p&gt;With that said, today is a really big and important day, as Web API has been publicly released in its RTM version. This effectively means that you have binaries you can safely use in production scenarios and take advantage of all the great features of the framework. You can [download MVC4 (including Web API) RTM here][1].&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s go through the new features in RTM.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Testing routes in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/08/testing-routes-in-asp-net-web-api/</link>
      <pubDate>Sun, 12 Aug 2012 09:10:30 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/08/testing-routes-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;The question that often comes up when talking to developers and clients about Web API solutions is how exactly should you go about testing your route configuration in Web API? Some would perhaps argue that in certain cases, especially if you stick to RESTful approach, this type of testing wouldn&amp;rsquo;t even be necessary, because the convention over configuration provided by the framework means that you effecitvely end up testing something that&amp;rsquo;s internal working of Web API.&lt;/p&gt;
&lt;p&gt;With that said, especially when you have complex routes, or when you break the Restful approach and provide RPC-style API, or if you have your API actions decorated with HTTP verbs that don&amp;rsquo;t match the action names, you probably want to (and probably should, if you ask me) test the API routing to make sure certain requests end up in proper places.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s deal with this interesting problem.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Adding OpenID authentication to your ASP.NET MVC 4 application</title>
      <link>https://www.strathweb.com/2012/08/adding-openid-authentication-to-your-asp-net-mvc-4-application/</link>
      <pubDate>Wed, 01 Aug 2012 20:18:05 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/08/adding-openid-authentication-to-your-asp-net-mvc-4-application/</guid>
      <description>&lt;p&gt;I am currently working on an MVC4 project that allows users to authenticate through OpenID. I don&amp;rsquo;t think I need to convince anyone about the benefits for both parties that come with that. Users don&amp;rsquo;t have to register at your site, and you have less of those tedious account maintance tasks.&lt;/p&gt;
&lt;p&gt;Although it&amp;rsquo;s apparently coming later on as a built-in feature into the Visual Studio templates (Damien Edwards showed that stuff for Web Forms during aspConf), let me show how you can very quickly add simple OpenID support to your MVC4 application.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>BSON (Binary JSON) and how your Web API can be even faster</title>
      <link>https://www.strathweb.com/2012/07/bson-binary-json-and-how-your-web-api-can-be-even-faster/</link>
      <pubDate>Sun, 22 Jul 2012 16:07:37 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/07/bson-binary-json-and-how-your-web-api-can-be-even-faster/</guid>
      <description>&lt;p&gt;I have been reading the wishlist at Web API Codeplex repository recently, and noticed that one of the most popular requested features, is to add support for BSON (Binary JSON) media type (6th on the [list][1]).&lt;/p&gt;
&lt;p&gt;Of course all it takes to include BSON into your Web API is to simply write a media type formatter for it, and since JSON.NET already has great BSON support, it is actually quite easy.&lt;/p&gt;
&lt;p&gt;Now, you might be asking a question, why to do it in the first place? Isn&amp;rsquo;t JSON enough? Well, the main reason is performance, as according to JSON.NET tests, BSON would produce output that&amp;rsquo;s often smaller than JSON (up to 25%). It is also much quicker to encode and decode, as for simple types there is no parsing to/from their string representation.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s do it then.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Everything you want to know about ASP.NET Web API content negotiation</title>
      <link>https://www.strathweb.com/2012/07/everything-you-want-to-know-about-asp-net-web-api-content-negotation/</link>
      <pubDate>Sun, 15 Jul 2012 16:04:21 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/07/everything-you-want-to-know-about-asp-net-web-api-content-negotation/</guid>
      <description>&lt;p&gt;One of the key concepts in ASP.NET Web API, lying pretty much at the heart of it, is content negotiation - or simply &lt;em&gt;conneg&lt;/em&gt;. I really believe that, before you start developing Web API solutions, you need to understand conneg well.&lt;/p&gt;
&lt;p&gt;I thought it would be interesting to try to explain content negotiation in detail - what it is, what it does, and why it does that, especially as I have seen a lot of questions, misconceptions and misunderstandings around it on various boards or question sites.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using NLog to provide custom tracing for your ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/06/using-nlog-to-provide-custom-tracing-for-your-asp-net-web-api/</link>
      <pubDate>Mon, 25 Jun 2012 17:41:01 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/06/using-nlog-to-provide-custom-tracing-for-your-asp-net-web-api/</guid>
      <description>&lt;p&gt;One of the things I love most about MVC3, and now ASP.NET Web API, is that pretty much any functionality or service that is used by your application, can be replaced with a custom one. One of these is the entire tracing mechanism that Web API uses.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look today at how you can build a simple &lt;em&gt;System.Web.Http.Tracing.ITraceWriter&lt;/em&gt; implementation to provide support for a custom logging framework in your Web API - in our case it will be NLog.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using controllers from an external assembly in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/06/using-controllers-from-an-external-assembly-in-asp-net-web-api/</link>
      <pubDate>Wed, 20 Jun 2012 19:18:11 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/06/using-controllers-from-an-external-assembly-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;In general, in my day-to-day job, I am working with large enterprise web applications, where clean projects, noise reduction and test driven development are holy. Therefore I have always been a big fan of placing MVC controllers outside the actual web application project, in a separate class library (or libraries).&lt;/p&gt;
&lt;p&gt;With MVC it was very simple, but recently I faced this challenge in Web API, and turns out neither passing the assembly name through &lt;em&gt;MapHttpRoute&lt;/em&gt; (not supported) or using something like &lt;em&gt;ControllerBuilder.Current.DefaultNamespaces&lt;/em&gt; is not a viable option. So I turned to &lt;a href=&#34;https://twitter.com/frystyk/&#34;&gt;Henrik Nielsen&lt;/a&gt; for advice, and sure enough, &lt;a href=&#34;https://twitter.com/frystyk/status/211970758862307328&#34;&gt;he helped immediately&lt;/a&gt;. Let&amp;rsquo;s explore the solution.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Drag and drop files to WPF application and asynchronously upload to ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/06/drag-and-drop-files-to-wpf-application-and-asynchronously-upload-to-asp-net-web-api/</link>
      <pubDate>Sun, 17 Jun 2012 21:02:23 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/06/drag-and-drop-files-to-wpf-application-and-asynchronously-upload-to-asp-net-web-api/</guid>
      <description>&lt;p&gt;A while ago, I wrote a post on uploading files to ASP.NET Web API by &lt;a href=&#34;https://www.strathweb.com/2012/04/html5-drag-and-drop-asynchronous-multi-file-upload-with-asp-net-webapi/&#34;&gt;dragging and dropping them to the browser&lt;/a&gt;. Today I will continue with the same topic, but instead, let&amp;rsquo;s build a WPF application to which you can drag and drop files, and they&amp;rsquo;ll get uploaded to ASP.NET Web API.&lt;/p&gt;
&lt;p&gt;The important thing, is that we will use the *exact* same Web API upload controller as before, meaning the same controller will be handling uploads from the browser and from the client (WPF) application. The client will use the new &lt;em&gt;HttpClient&lt;/em&gt; and it&amp;rsquo;s client-side &lt;em&gt;DelegatingHandlers&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API integration testing with in-memory hosting</title>
      <link>https://www.strathweb.com/2012/06/asp-net-web-api-integration-testing-with-in-memory-hosting/</link>
      <pubDate>Tue, 12 Jun 2012 16:47:30 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/06/asp-net-web-api-integration-testing-with-in-memory-hosting/</guid>
      <description>&lt;p&gt;In-memory hosting is one of the hidden gems of ASP.NET Web API. While the community, forums, bloggers have been buzzing about web-host and self-host capabilities of Web API, aside from the &lt;a href=&#34;http://pfelix.wordpress.com/2012/03/05/asp-net-web-api-in-memory-hosting/&#34; target=&#34;_blank&#34;&gt;terrific post&lt;/a&gt; by Pedro Felix, very little has been said about &lt;strong&gt;in memory hosting&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Let me show you an example today, how a lightweight Web API server can be temporarily established in memory (without elevated priviliges, or cannibalizing ports like self host) and used to perform integration testing, allowing you to test almost the entire pipeline, from the request to the response.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Control the execution order of your filters in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/06/control-the-execution-order-of-your-filters-in-asp-net-web-api/</link>
      <pubDate>Fri, 08 Jun 2012 16:00:31 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/06/control-the-execution-order-of-your-filters-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;One of the few minor annoyances in ASP.NET Web API is that you lack the ability to control the order in which the attributes/filters are executed. If you have several of those applied to one action, they will not run in the order they have been declared in the code, and that sometimes may cause a lot of problems.&lt;/p&gt;
&lt;p&gt;In fact, as a member of the ASP.NET Web API Advisory Group I already brought that up during our meetings, not to mention it has already been submitted as an issue to the ASP.NET team on Codeplex. In the meantime, let&amp;rsquo;s tackle this problem and see how you can easily regain control over the execution order of the attributes.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Extending your ASP.NET Web API responses with useful metadata</title>
      <link>https://www.strathweb.com/2012/06/extending-your-asp-net-web-api-responses-with-useful-metadata/</link>
      <pubDate>Sun, 03 Jun 2012 13:27:13 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/06/extending-your-asp-net-web-api-responses-with-useful-metadata/</guid>
      <description>&lt;p&gt;If you ever worked with any API, which, in this day of age, you must have, you surely noticed that in most situations the API response isn&amp;rsquo;t just the result (requested data), but also a set of helpful metadata, like &amp;ldquo;total Results&amp;rdquo;, &amp;ldquo;timestamp&amp;rdquo;, &amp;ldquo;status&amp;rdquo; and so on.&lt;/p&gt;
&lt;p&gt;In Web API, by default, you just serialize your models (or DTO) and such information are not present. Let&amp;rsquo;s build something which will solve this problem and help you decorate your response with hepful information. This would make it very easy for the client to implement paging, auto-loading scenarios, caching (if you return last modified information) and a lot more.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Implementing message handlers to track your ASP.NET Web API usage</title>
      <link>https://www.strathweb.com/2012/05/implementing-message-handlers-to-track-your-asp-net-web-api-usage/</link>
      <pubDate>Wed, 16 May 2012 20:49:01 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/05/implementing-message-handlers-to-track-your-asp-net-web-api-usage/</guid>
      <description>&lt;p&gt;Today&amp;rsquo;s focus is going to be on message handlers (or, to be precise, DelegatingHandlers) in ASP.NET Web API. If you are familiar with WCF you can surely recall them - used to be called DelegatingChannels at some point - but the purpose has been the same all along, to provide the first (or last, depending whether you look at requests or responses) extendibility point in your Web API applications. You stack up as many message handlers on top of each other as you wish, and the request will travel through all of them.&lt;/p&gt;
&lt;p&gt;This, in turn, gives us developers a possibility to process/alter/modify/decline the incoming HTTP request before it reaches the &lt;em&gt;HttpControllerDispatcher&lt;/em&gt;. Then, when the controller creates the response, it goes through the same chain of message handlers again, so we can tamper with the response. One example of the applicability of this is that message handlers are a perfect place to address security related matters i.e. integrating OAuth.&lt;/p&gt;
&lt;p&gt;The plan for today is to show how DelegatingHandlers are used by building a functionality that checks for an API key on an incoming API request and then logs all requests and responses, thus allowing you to track the usage of your API.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Output caching in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/05/output-caching-in-asp-net-web-api/</link>
      <pubDate>Thu, 10 May 2012 16:46:17 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/05/output-caching-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;Today we will continue with our favorite topic - ASP.NET Web API. I&amp;rsquo;ve heard folks asking about how you could easily cache the output of the API methods. Well, in ASP.NET MVC, that&amp;rsquo;s dead easy, just decorate the Action with [OutputCache] attribute and that&amp;rsquo;s it. Unfortunately, ASP.NET Web API doesn&amp;rsquo;t have a built-in support for this attribute.&lt;/p&gt;
&lt;p&gt;Which doesn&amp;rsquo;t mean you can&amp;rsquo;t have it. Let&amp;rsquo;s build one&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Different MediaTypeFormatters for same MediaHeaderValue in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/04/different-mediatypeformatters-for-same-mediaheadervalue-in-asp-net-web-api/</link>
      <pubDate>Fri, 27 Apr 2012 15:39:39 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/04/different-mediatypeformatters-for-same-mediaheadervalue-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;Let’s say you have a model and want to serve it through a different MediaTypeFormatter from different controllers or routes or urls? You want same content type (MediaHeaderValue) request, to be formatted differently in different situations - how could you do that, if everything resides in GlobalConfiguration?&lt;/p&gt;
&lt;p&gt;It would be perfect to be able to use per-controller configuration in ASP.NET Web API. Unfortunately, at this stage, this feature is not yet supported. &lt;a href=&#34;http://www.twitter.com/frystyk&#34;&gt;Henrik&lt;/a&gt; mentioned that &lt;a href=&#34;http://blogs.msdn.com/b/jmstall/&#34;&gt;Mike Stall&lt;/a&gt; is currently working on this, and it will be supported in the full release on Web API (perhaps even earlier, on codeplex?).&lt;/p&gt;
&lt;p&gt;Anyway, let&amp;rsquo;s take this idea for a spin and explore what we could do in &lt;em&gt;beta&lt;/em&gt; version of ASP.NET Web API, because we could still vary our formatters and responses.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>RSS &amp; Atom MediaTypeFormatter for ASP.NET WebAPI</title>
      <link>https://www.strathweb.com/2012/04/rss-atom-mediatypeformatter-for-asp-net-webapi/</link>
      <pubDate>Sun, 22 Apr 2012 12:53:12 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/04/rss-atom-mediatypeformatter-for-asp-net-webapi/</guid>
      <description>&lt;p&gt;Today we are going to build a custom formatter for ASP.NET WebAPI, deriving from MediaTypeFormatter class. It will return our model (or collection of models) in RSS or Atom format.&lt;br&gt;
The Formatter is supposed to react to requests sent with request headers &amp;ldquo;Accept: application/atom+xml&amp;rdquo; and &amp;ldquo;Accept: application/rss+xml&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s get going.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Fun with ASP.NET Web API – push-like messaging from one application to multiple subscriber applications</title>
      <link>https://www.strathweb.com/2012/03/fun-with-asp-net-web-api-push-like-messaging-from-one-application-to-multiple-subscriber-applications/</link>
      <pubDate>Thu, 29 Mar 2012 22:33:30 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/03/fun-with-asp-net-web-api-push-like-messaging-from-one-application-to-multiple-subscriber-applications/</guid>
      <description>&lt;p&gt;So last time around we built together a small &lt;a href=&#34;https://www.strathweb.com/2012/03/build-p2p-chat-application-with-wpf-and-asp-net-web-api/&#34;&gt;p2p chat app using WPF and ASP.NET Web API&lt;/a&gt;. Today, we are continuing our experiments with ASP.NET Web API and setting up a simple push (or push-like) messaging system between different apps using self hosting.&lt;/p&gt;
&lt;p&gt;In fact, we&amp;rsquo;ll use one app (&amp;ldquo;server&amp;rdquo;) to push out messages to a number of other apps (&amp;ldquo;clients&amp;rdquo; or &amp;ldquo;subscribers&amp;rdquo;). Even though we have the (in)glorious WCF callbacks at our disposal, I thought it might be fun to try it that way. Hopefully, that sounds interesting, or at least intruiging. In the process we&amp;rsquo;ll also serialize custom types to JSON using JSON.NET and pass them between self-hosting applications.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Build p2p chat application with WPF and ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/03/build-p2p-chat-application-with-wpf-and-asp-net-web-api/</link>
      <pubDate>Sun, 25 Mar 2012 13:25:22 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/03/build-p2p-chat-application-with-wpf-and-asp-net-web-api/</guid>
      <description>&lt;p&gt;Recently I&amp;rsquo;ve been really enjoying myself with ASP.NET Web API. It is a tremendous beast, and with it&amp;rsquo;s self-hosting capabilities, it&amp;rsquo;s suitable as an HTTP-channeled-communication not only for ASP.NET websites, but also for any other .NET applications. In this post, I&amp;rsquo;m gonna try to show you the outcome of my weekend mash up - a peer-to-peer WPF chat application (clients connect directly to each other), fueled by ASP.NET Web API.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Serializing Entity Framework objects to JSON in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/03/serializing-entity-framework-objects-to-json-in-asp-net-web-api/</link>
      <pubDate>Wed, 21 Mar 2012 23:23:21 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/03/serializing-entity-framework-objects-to-json-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;Recently, I&amp;rsquo;ve been playing a lot with ASP.NET Web API, as it is really an exciting technology. It works exceptionally well with JSON.NET (Henrik Nielsen &lt;a href=&#34;http://blogs.msdn.com/b/henrikn/archive/2012/02/18/using-json-net-with-asp-net-web-api.aspx&#34;&gt;wrote a great post&lt;/a&gt; on how to return JSON from ASP.NET Web API using JSON.NET).&lt;/p&gt;
&lt;p&gt;However, as it&amp;rsquo;s been the case in the past with i.e. WCF, I&amp;rsquo;ve run into a issue with serializing Entity Framework object to JSON when returning them from the ApiController. This is not, by any means, an issue in ASP.NET Web API, as the problem in this case lies in the EF lazy loading, which causes circular reference between the objects. This then throws a corresponding error - &amp;ldquo;A circular reference was detected while serializing an object of type (…)&amp;rdquo; if you are using JavaScriptSerializer, &amp;ldquo;Self referencing loop detected for type (…)&amp;rdquo; if you are using JSON.NET and so on.&lt;/p&gt;
&lt;p&gt;I thought it might be useful to remind about possible solutions to this. There is an easy workaround.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>LINQ foreach iteration variable capturing and how it’s fixed in Visual Studio 11</title>
      <link>https://www.strathweb.com/2012/03/linq-foreach-iteration-variable-capturing-and-how-its-fixed-in-visual-studio-11/</link>
      <pubDate>Fri, 16 Mar 2012 10:02:31 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/03/linq-foreach-iteration-variable-capturing-and-how-its-fixed-in-visual-studio-11/</guid>
      <description>&lt;p&gt;A while a go, the C# community got surprised by another &lt;a href=&#34;http://en.wikipedia.org/wiki/Gotcha_(programming)&#34; target=&#34;_blank&#34;&gt;GOTCHA&lt;/a&gt;, discovering that using a foreach iteration variable inside a LINQ query, may not always yield the expected results. The variable gets captured by the foreach loop and, due to the evil work of &lt;a href=&#34;http://en.wikipedia.org/wiki/Closure_(computer_science)&#34; target=&#34;_blank&#34;&gt;closure&lt;/a&gt;, it remains scoped outside of the LINQ query itself living its own life so to speak. This has now been corrected in the Visual Studio 11 Beta.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
