<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Net on Strathweb. A free flowing tech monologue.</title>
    <link>https://www.strathweb.com/categories/net/</link>
    <description>Recent content in Net on Strathweb. A free flowing tech monologue.</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 24 Mar 2026 07:00:00 +0000</lastBuildDate><atom:link href="https://www.strathweb.com/categories/net/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Introducing AgentGuard - declarative guardrails for .NET AI agents</title>
      <link>https://www.strathweb.com/2026/03/introducing-agentguard-declarative-guardrails-for-dotnet-ai-agents/</link>
      <pubDate>Tue, 24 Mar 2026 07:00:00 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2026/03/introducing-agentguard-declarative-guardrails-for-dotnet-ai-agents/</guid>
      <description>&lt;p&gt;As AI agents become more common in .NET applications, the question of how to keep them safe and well-behaved keeps coming up. Prompt injection, PII leakage, topic drift, tool call abuse - these are all problems that every team building with agents ends up having to deal with, often by hand-rolling ad-hoc checks. Python developers have had libraries like &lt;a href=&#34;https://github.com/NVIDIA/NeMo-Guardrails&#34;&gt;NeMo Guardrails&lt;/a&gt; and &lt;a href=&#34;https://github.com/guardrails-ai/guardrails&#34;&gt;Guardrails AI&lt;/a&gt; to help with this for a while now, but the .NET side has been largely left to fend for itself.&lt;/p&gt;
&lt;p&gt;Today I would like to introduce &lt;a href=&#34;https://filipw.github.io/AgentGuard&#34;&gt;AgentGuard&lt;/a&gt;, a library I have been working on to fill that gap - composable, declarative guardrails and safety controls for .NET AI agents.&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>Running Phi Inference in .NET Applications with Strathweb Phi Engine</title>
      <link>https://www.strathweb.com/2024/12/running-phi-inference-in-net-applications-with-strathweb-phi-engine/</link>
      <pubDate>Fri, 20 Dec 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/12/running-phi-inference-in-net-applications-with-strathweb-phi-engine/</guid>
      <description>&lt;p&gt;Local AI inference has become increasingly important for developers seeking to build robust, privacy-preserving applications. In this deep dive, I&amp;rsquo;ll show you how to leverage &lt;a href=&#34;https://www.strathweb.com/2024/07/announcing-strathweb-phi-engine-a-cross-platform-library-for-running-phi-3-anywhere&#34;&gt;Strathweb Phi Engine&lt;/a&gt; multi-platform library to run Microsoft&amp;rsquo;s Phi-family models directly in your .NET applications, exploring both basic integration patterns and advanced features that make Phi inference more accessible than ever.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using Local Phi-3 Models in AutoGen with Strathweb Phi Engine</title>
      <link>https://www.strathweb.com/2024/09/using-local-phi-3-models-in-autogen-with-strathweb-phi-engine/</link>
      <pubDate>Fri, 06 Sep 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/09/using-local-phi-3-models-in-autogen-with-strathweb-phi-engine/</guid>
      <description>&lt;p&gt;I recently announced &lt;a href=&#34;https://www.strathweb.com/2024/07/announcing-strathweb-phi-engine-a-cross-platform-library-for-running-phi-3-anywhere&#34;&gt;Strathweb Phi Engine&lt;/a&gt;, a cross-platform library/toolset for conveniently running Phi-3 (almost) anywhere. Today I would like to show how to integrate a local Phi-3 model, orchestrated by Strathweb Phi Engine, into an agentic workflow built with &lt;a href=&#34;https://github.com/microsoft/autogen&#34;&gt;AutoGen&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Announcing Strathweb Phi Engine - a cross-platform library for running Phi-3 anywhere</title>
      <link>https://www.strathweb.com/2024/07/announcing-strathweb-phi-engine-a-cross-platform-library-for-running-phi-3-anywhere/</link>
      <pubDate>Thu, 25 Jul 2024 04:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/07/announcing-strathweb-phi-engine-a-cross-platform-library-for-running-phi-3-anywhere/</guid>
      <description>&lt;p&gt;I &lt;a href=&#34;https://www.strathweb.com/2024/05/running-microsoft-phi-3-model-in-an-ios-app-with-rust&#34;&gt;recently&lt;/a&gt; wrote a blog post about using Rust to run Phi-3 model on iOS. The post received an overwhelmingly positive response, and I got a lot of questions about running Phi-3 using similar approach on other platforms, such as Android, Windows, macOS or Linux. Today, I&amp;rsquo;m excited to announce the project I have been working on recently - Strathweb Phi Engine, a cross-platform library for running Phi-3 (almost) anywhere.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Calling Rust code from C#</title>
      <link>https://www.strathweb.com/2023/06/calling-rust-code-from-csharp/</link>
      <pubDate>Thu, 22 Jun 2023 08:00:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/06/calling-rust-code-from-csharp/</guid>
      <description>&lt;p&gt;There are plenty of reasons to be excited about Rust. Rust provides cross-platform compatibility and can compile to nearly any platform, including Windows, iOS, Android, and many more. One of Rust&amp;rsquo;s core features is its focus on memory safety. It accomplishes this through its ownership model, which helps prevent common bugs such as null pointer dereferencing, dangling pointers, and data races.&lt;/p&gt;
&lt;p&gt;All of this makes Rust an excellent alternative to C++/C for implementing shared logic and algorithms, spanning many different platforms.&lt;/p&gt;
&lt;p&gt;In this post we shall see how we can integrate Rust into program written in C# - and how a native library built with Rust can be called into from a .NET application.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Hello OmniSharp on .NET 6.0!</title>
      <link>https://www.strathweb.com/2022/01/hello-omnisharp-on-net-6-0/</link>
      <pubDate>Mon, 31 Jan 2022 18:31:34 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/01/hello-omnisharp-on-net-6-0/</guid>
      <description>&lt;p&gt;On December 15, 2021 we &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn/blob/master/CHANGELOG.md#1380&#34;&gt;released&lt;/a&gt; version 1.38.0 of OmniSharp which, for the first time, included .NET 6.0 builds of the OmniSharp server. The related feature branch was maintained for over a year, and previously contained a .NET 5-based variant of OmniSharp, though that one was never released.&lt;/p&gt;
&lt;p&gt;This is a big milestone in the OmniSharp project as the .NET 6.0 build is much faster and a lot more stable, and is the first step towards retiring the .NET Framework/Mono builds of OmniSharp.&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>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>Reactive Azure Service Bus messaging with Azure Event Grid</title>
      <link>https://www.strathweb.com/2019/05/reactive-azure-service-bus-messaging-with-azure-event-grid/</link>
      <pubDate>Fri, 31 May 2019 10:51:41 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/05/reactive-azure-service-bus-messaging-with-azure-event-grid/</guid>
      <description>Earlier this month, I wrote an article for my friends over at DotNetCurry. They run a free digital magazine called DNC Magazine, that comes out every 2 months, is free to download and to which I occasionally contribute.
The article is entitled &amp;ldquo;Reactive Azure Service Bus messaging with Azure Event Grid&amp;rdquo;. In the article, I explore Service Bus integration with Azure Event Grid, and the advantages and scenarios it brings to the table.</description>
    </item>
    
    <item>
      <title>Solution-wide Nuget package version handling with MsBuild 15&#43;</title>
      <link>https://www.strathweb.com/2018/07/solution-wide-nuget-package-version-handling-with-msbuild-15/</link>
      <pubDate>Fri, 20 Jul 2018 13:04:06 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/07/solution-wide-nuget-package-version-handling-with-msbuild-15/</guid>
      <description>&lt;p&gt;Last year &lt;a href=&#34;https://www.strathweb.com/2017/09/solution-wide-nuget-package-handling-in-net-sdk-based-projects/&#34;&gt;I blogged&lt;/a&gt; about a way to handle NuGet package versions at the solution level for .NET SDK-based &lt;em&gt;csproj&lt;/em&gt; project files (so those using &lt;em&gt;&lt;PackageReference /&gt;&lt;/em&gt; entries to define their NuGet dependencies).&lt;/p&gt;
&lt;p&gt;That approach worked reasonably well, but was entirely custom - as it simply relied on defining reusable MsBuild properties to handled the versions, which created a bit of overhead.&lt;/p&gt;
&lt;p&gt;With MsBuild 15 and newer, you can actually do it in a much more elegant way. Let&amp;rsquo;s have a look.&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>Solution-wide Nuget package handling in .NET SDK-based projects</title>
      <link>https://www.strathweb.com/2017/09/solution-wide-nuget-package-handling-in-net-sdk-based-projects/</link>
      <pubDate>Fri, 29 Sep 2017 08:25:21 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/09/solution-wide-nuget-package-handling-in-net-sdk-based-projects/</guid>
      <description>&lt;p&gt;In this blog post I’d like to show you a very simple technique for ensuring all your Nuget packages across all the projects in a solution have the same version. Such package management improvement introduced recently &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn/pull/954&#34;&gt;into the OmniSharp code&lt;/a&gt; by one and only &lt;a href=&#34;https://twitter.com/dcampbell&#34;&gt;Dustin Campbell&lt;/a&gt;, and I’ve also been using it in some of my projects.&lt;/p&gt;
&lt;p&gt;If your solution is built around .NET SDK &lt;em&gt;csproj&lt;/em&gt; projects, which were introduced in Visual Studio 2017, hopefully this blog post will be useful to you.&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>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>Customizing FormatFilter behavior in ASP.NET Core MVC 1.0</title>
      <link>https://www.strathweb.com/2016/07/customizing-formatfilter-behavior-in-asp-net-core-mvc-1-0/</link>
      <pubDate>Wed, 06 Jul 2016 18:57:33 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/07/customizing-formatfilter-behavior-in-asp-net-core-mvc-1-0/</guid>
      <description>&lt;p&gt;When you are building HTTP APIs with ASP.NET Core MVC, the framework allows you to use &lt;em&gt;FormatFilter&lt;/em&gt; to let the calling client override any content negotiation that might have happened on the server side.&lt;/p&gt;
&lt;p&gt;This way, the client can - for example - force the return data to be JSON or CSV or any other format suitable (as long as the server supports it, of course) for his consumption.&lt;/p&gt;
&lt;p&gt;The built-in mechanism (out of the box version of &lt;em&gt;FormatFilter&lt;/em&gt;) is a little limited, so let&amp;rsquo;s have a look at how you can extend and customize its behavior.&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>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>Running ASP.NET 5 website on IIS</title>
      <link>https://www.strathweb.com/2015/12/running-asp-net-5-website-on-iis/</link>
      <pubDate>Wed, 16 Dec 2015 19:04:46 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/12/running-asp-net-5-website-on-iis/</guid>
      <description>&lt;p&gt;As &lt;a href=&#34;http://blogs.msdn.com/b/webdev/archive/2015/11/18/announcing-asp-net-5-release-candidate-1.aspx&#34;&gt;ASP.NET 5 hit RC1&lt;/a&gt; about a month go, more and more folks are looking at production deployments and other real life use cases of it. Going beyond demoware and experiments, to real applications, inevitably leads to thinking about hosting it somewhere - which, if your environment is Windows, most likely means IIS.&lt;/p&gt;
&lt;p&gt;I have recently gone through quite some trouble getting it all to work, so I thought it might be useful to document and highlight some of the steps, which hopefully will save a bit of your time.&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>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>Open Source .NET – why should you care?</title>
      <link>https://www.strathweb.com/2014/11/open-source-net-care/</link>
      <pubDate>Wed, 12 Nov 2014 16:29:43 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/11/open-source-net-care/</guid>
      <description>&lt;p&gt;Moments ago, at &lt;a href=&#34;http://www.visualstudio.com/connect-event-live-vs&#34;&gt;VS Connect event&lt;/a&gt;, Microsoft, through the Corporate Vice President of the Developer Division S. Somasegar, &lt;a href=&#34;http://blogs.msdn.com/b/somasegar/archive/2014/11/12/opening-up-visual-studio-and-net-to-every-developer-any-application-net-server-core-open-source-and-cross-platform-visual-studio-community-2013-and-preview-of-visual-studio-2015-and-net-2015.aspx&#34;&gt;dropped a bomb on the developer community&lt;/a&gt; by announcing that the &lt;a href=&#34;https://github.com/microsoft/dotnet&#34;&gt;.NET Core Framework&lt;/a&gt;, a new &lt;strong&gt;true cross platform .NET&lt;/strong&gt;, has been open sourced (note, it&amp;rsquo;s still partial, not everything is there yet), and released under a very permissive MIT license. You can read up more on the .NET Core at the &lt;a href=&#34;http://blogs.msdn.com/b/dotnet/archive/2014/11/12/net-core-is-open-source.aspx&#34;&gt;official blog.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a dramatic shift in an ecosystem that has traditionally been (fair or not) characterized as closed, often &lt;a href=&#34;http://blog.jonathanoliver.com/why-i-left-dot-net/&#34;&gt;unfriendly to developers&lt;/a&gt;, Windows-specific (Mono is not, after all, a Microsoft project) and characterized by relatively high entry barriers (Visual Studio, lockdown to Windows Server etc).&lt;/p&gt;
&lt;p&gt;I have a bunch of quick thoughts around this that I&amp;rsquo;d like to share.&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>Dynamic action return with Web API 2.1</title>
      <link>https://www.strathweb.com/2014/02/dynamic-action-return-web-api-2-1/</link>
      <pubDate>Wed, 05 Feb 2014 21:53:39 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/02/dynamic-action-return-web-api-2-1/</guid>
      <description>&lt;p&gt;One of the small things (aka hidden gems) that was released with Web API 2.1, was the &lt;a href=&#34;http://aspnetwebstack.codeplex.com/SourceControl/changeset/cff6169cc730644d75a11cd7e34f695a7e2fffd0&#34;&gt;support of dynamic return type&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This went largely unnoticed, since it&amp;rsquo;s buried deep in the Web API source code but it has some very useful repercussions for API developers.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at the future.&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>The future is now – OWIN and multi-hosting ASP.NET web applications</title>
      <link>https://www.strathweb.com/2013/05/the-future-is-now-owin-and-multi-hosting-asp-net-web-applications/</link>
      <pubDate>Sun, 05 May 2013 15:16:47 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/05/the-future-is-now-owin-and-multi-hosting-asp-net-web-applications/</guid>
      <description>&lt;p&gt;As you probably know, the ASP.NET team is publishing the latest ASP.NET Web API on a nightly MyGet feed, and you can grab them from there and play with the latest stuff without having to deal with all the hassle related to building from the source.&lt;/p&gt;
&lt;p&gt;The same applies to Katana, a Microsoft generic Owin host, which also has its own MyGet nightly feed.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s glimpse into the near future and have a look at putting the latest Katana bits to play with ASP.NET Web API and other frameworks.&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>Running ASP.NET Web API with OWIN and Katana</title>
      <link>https://www.strathweb.com/2012/12/running-aspnet-web-api-with-owin-and-katana/</link>
      <pubDate>Tue, 18 Dec 2012 04:06:59 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/12/running-aspnet-web-api-with-owin-and-katana/</guid>
      <description>&lt;p&gt;One of the often repeated, and frankly, somewhat unfair, arguments against using .NET based technologies is that by doing so, you handcuff yourself to all kinds of various Microsoft tools and products.&lt;/p&gt;
&lt;p&gt;If you choose to use ASP.NET Web API, by no means you are tied to IIS. Of course, one of the options is to self host it (and run the web service using the hardened WCF core), but if you want a true web host flexibility and independence, you can very easily host Web API using OWIN and Katana.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using existing database with Azure Mobile Services</title>
      <link>https://www.strathweb.com/2012/12/using-existing-database-with-azure-mobile-services/</link>
      <pubDate>Wed, 12 Dec 2012 03:40:43 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/12/using-existing-database-with-azure-mobile-services/</guid>
      <description>&lt;p&gt;One of the topics we like to come back to on this blog is Azure Mobile Services (ZUMO) - and rightfully so, because that&amp;rsquo;s a terrific service, capable of smoothly fueling your application&amp;rsquo;s backend in a hassle-free and scalable manner.&lt;/p&gt;
&lt;p&gt;One thing you might have noticed about ZUMO though, is that pretty much all the online tutorials and materials related to it will show you how to work with it &lt;em&gt;from scratch&lt;/em&gt;. One of the unknown facts about it, is that, with some slight modifications, you can actually plug in your existing SQL Server (or rather SQL Azure) database (provided you have earlier migrated it to Windows Azure of course), and serve it for your application utilizing the power of Azure Mobile Services.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s a have a look at how you&amp;rsquo;d configure that.&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>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>Dealing with large files in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/09/dealing-with-large-files-in-asp-net-web-api/</link>
      <pubDate>Mon, 24 Sep 2012 21:17:57 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/09/dealing-with-large-files-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;There are a couple of things to consider when dealing with large file uploads and ASP.NET Web API. First of all, there are typical issues related to hosting within IIS context, and the limitations imposed on the service by default by the ASP.NET framework.&lt;/p&gt;
&lt;p&gt;Secondly, there is the usual problem of having to deal with out of memory issues when allowing external parties or users to upload buffered large files. As a consequence, streamed uploads or downloads can greatly improve the scalability of the solutions by eliminating the need for large memory overheads on buffers.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how to tackle these issues.&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>Deploy your ASP.NET Web API application to Windows Azure in 3 minutes</title>
      <link>https://www.strathweb.com/2012/07/deploy-your-asp-net-web-api-application-to-windows-azure-in-3-minutes/</link>
      <pubDate>Sun, 08 Jul 2012 11:43:37 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/07/deploy-your-asp-net-web-api-application-to-windows-azure-in-3-minutes/</guid>
      <description>&lt;p&gt;Over the past months I have been blogging about ASP.NET Web API a lot. One question that I haven&amp;rsquo;t really addressed, is how to send this beast to production - because it&amp;rsquo;s one thing to develop something, and completely different to have it up and running in live environment.&lt;/p&gt;
&lt;p&gt;While so many members of the community have really enjoyed Windows Azure since it has been unveiled in the new shape recently, a lot of people are still uncertain how to work with it - because, well, &amp;ldquo;cloud&amp;rdquo; has always sounded a little enterprise-like. I thought it might help people to have a quick step-by-step guide on how you could really easily deploy your app to Azure (using Git!).&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Run your favorite unit testing GUI directly from Visual Studio</title>
      <link>https://www.strathweb.com/2012/07/run-your-favorite-unit-testing-gui-directly-from-visual-studio/</link>
      <pubDate>Mon, 02 Jul 2012 21:09:35 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/07/run-your-favorite-unit-testing-gui-directly-from-visual-studio/</guid>
      <description>&lt;p&gt;If you are working a lot with unit tests and somehow are allergic to command line testing (I, for one, am) there is an easy way to configure your test project&amp;rsquo;s build to start your favorite&amp;rsquo;s library GUI automatically and load the test assembly into it.&lt;/p&gt;
&lt;p&gt;This is very convenient and, as a bonus, allows you to set breakpoints in the test code, without having to attach to any processes.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a quick look at how you can do that for xUnit and nUnit.&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>Attribute based routing in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/05/attribute-based-routing-in-asp-net-web-api/</link>
      <pubDate>Wed, 23 May 2012 20:05:34 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/05/attribute-based-routing-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;Routing is the key aspect of every MVC application - after all, it&amp;rsquo;s how people get to your application, and how search engines see it. As flexible as routing in ASP.NET MVC has been, one would often end up in frustrating situations where more flexibility was needed (or you simply started getting lost in a maze of routes). One of the finest extensions to ASP.NET MVC I have ever worked with is the excellent library &lt;em&gt;AttributeRouting&lt;/em&gt; by &lt;a href=&#34;https://github.com/mccalltd/AttributeRouting&#34;&gt;Tim McCall&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Last month, through the great work of &lt;a href=&#34;http://kamranicus.com/&#34;&gt;Kamran Ayub&lt;/a&gt;, the library has been extended to support ASP.NET Web API, and is now available on NuGet. Let&amp;rsquo;s have a look at how it can immediately make your life easier and drastically improve the way you handle your routes.&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>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>
