Strongly typed configuration in ASP.NET Core without IOptions<T>
There are several great resources on the Internet about using the new Configuration and Options framework of ASP.NET Core - like this comprehensive post by Rick Strahl.
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 IConfiguration directly to your POCO object - so that you can inject it directly into the dependent classes without wrapping into IOptions
Required query string parameters in ASP.NET Core MVC
Today let’s have a look at two extensibility points in ASP.NET Core MVC - IActionConstraint and IParameterModelConvention. We’ll see how we can utilize them to solve a problem, that is not handled out of the box by the framework - creating an MVC action that has mandatory query string parameters.
Let’s have a look.
[Controller] and [NonController] attributes in ASP.NET Core MVC
One of the late additions before the RTM release of ASP.NET Core MVC was the introduction of the [Controller] attribute, and its counterpart, [NonController], which were added in RC2.
Together, they allow you to more specifically control which classes should be considered by the framework to be controllers (or controller candidates) and which shouldn’t. They also help you avoid the nasty hacks we needed to do in i.e. ASP.NET Web API to opt out from the “Controller” suffix in the name.
Let’s have a look.
Building Analyzers & Refactoring Tools with Roslyn (from NDC Sydney)
Building a lightweight, controller-less, Markdown-only website in ASP.NET Core
In this blog post let’s have a look at building a lightweight site in ASP.NET Core.
In “classic” ASP.NET we had the WebPages framework - which allowed us to build sites composed only of views. This was perfect for lightweight projects, where we didn’t need the entire model-controller infrastructure.
At the moment, ASP.NET Core doesn’t have an equivalent yet (though it’s being worked on), but we have already provided a similar type of experience via the WebApiContrib project (you can read more about the project here). With the help of some of the libraries from there, we can build controller-less sites for ASP.NET Core already.
In addition to that, we can combine it with using Markdown tag helpers for content delivery - and it will result in a very cool experience - being able to author ASP.NET Core sites, without controllers, in Markdown. With Razor sprinkled on top of it, to provide dynamic data.
Let’s have a look - more after the jump.
Announcing WebApiContrib for ASP.NET Core
In the past, a bunch of us from the ASP.NET Web API community worked together on a WebApiContrib project (or really, projects, cause there were many of them!).
The idea was to provide an easy to use platform, a one stop place for community contributions for ASP.NET Web API - both larger add ons, such as HTML/Razor support for Web API, as well as smaller things like i.e. reusable filters or even helper methods. This worked extremely well - WebApiContrib packages were downloaded over 500k times on Nuget, and a nice community has emerged around the project on Github.
Recently, we decided to restart the project, this time focusing on ASP.NET Core. Since the “brand” has caught on in the community and is fairly recognizable, we just called it WebApiContrib.Core.
Customizing FormatFilter behavior in ASP.NET Core MVC 1.0
When you are building HTTP APIs with ASP.NET Core MVC, the framework allows you to use FormatFilter to let the calling client override any content negotiation that might have happened on the server side.
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.
The built-in mechanism (out of the box version of FormatFilter) is a little limited, so let’s have a look at how you can extend and customize its behavior.
Inheriting route attributes in ASP.NET Web API
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’s have a look.
Implementing custom #load behavior in Roslyn scripting
#load directives in C# scripts are intended to allow you to reference a C# script source file from another C# script. As an author of a host application, in which the Roslyn scripting would be embedded, it’s up to you to define how #load should behave.
Let’s have a look at the process of doing that.
Global route prefix in ASP.NET Core MVC (revisited)
A couple of months ago I blogged about adding a feature 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.
That solution was written against beta8 version of ASP.NET Core and since now we are at RC2 - it doesn’t (surprise, surprise) work anymore.
Here is the updated version.
About

Hi! I'm Filip W., a software architect from Zürich 🇨🇭. I like Toronto Maple Leafs 🇨🇦, Rancid and quantum computing. Oh, and I love the Lowlands 🏴.
You can find me on Github, on Mastodon and on Bluesky.

Recent Posts
- 2025/03/10, Running Phi models on iOS with Apple MLX Framework
- 2025/02/24, Strathweb Phi Engine - now with Phi-4 support
- 2025/02/14, ML-KLEM and ML-DSA Post-Quantum Cryptography in .NET
- 2025/01/17, Fine tuning Phi models with MLX
- 2024/12/20, Running Phi Inference in .NET Applications with Strathweb Phi Engine
Categories
- ai (20)
- ai search (5)
- apache cordova (1)
- asp.net 5 (17)
- asp.net core (47)
- asp.net mvc (35)
- asp.net mvc 6 (7)
- asp.net vnext (6)
- asp.net web api (96)
- astronomy (1)
- autogen (1)
- azure (22)
- azure service bus (1)
- azure-devops (1)
- benchmark dotnet (1)
- bing maps (1)
- blazor (2)
- c plus (2)
- c-sharp (156)
- cryptography (6)
- csharp (6)
- csharp 10 (2)
- dnx (3)
- dotnet-cli (2)
- dotnet-script (11)
- duende (4)
- editorconfig (1)
- entity framework (2)
- espn api (2)
- events (1)
- ffi (4)
- fsharp (1)
- git (1)
- glimpse (1)
- html5 (4)
- identity server (2)
- iis (2)
- il (1)
- intro to qc (19)
- ios (7)
- javascript (9)
- jquery (4)
- jquery mobile metro (1)
- katana (2)
- kindle (1)
- knockout.js (8)
- kotlin (2)
- last.fm api (2)
- linq (1)
- mac (3)
- macos (1)
- mathematica (1)
- msbuild (3)
- mvc core (3)
- nancy (2)
- native (1)
- net (144)
- net 5 (3)
- net 6 (5)
- net 7 (7)
- net 8 (3)
- net 9 (1)
- net core (49)
- net sdk (2)
- ninject (2)
- odata (4)
- oidc (2)
- omnisharp (13)
- openai (11)
- osx (2)
- owin (5)
- phi (8)
- php (1)
- python (1)
- q-sharp (36)
- qir (3)
- qiskit (1)
- quantum computing (41)
- roslyn (30)
- rust (6)
- scriptcs (11)
- scripting (9)
- security (9)
- servicestack (2)
- signalr (8)
- swift (9)
- testing (5)
- twitter boostrap (1)
- typescript (1)
- visual studio (4)
- visual studio code (11)
- wasi (3)
- wasm (3)
- windows phone 7 (1)
- wordpress (1)
- wpf (2)