Overriding ASP.NET Core Framework-Provided Services

You take the red pill—you stay in Wonderland, and I show you how deep the rabbit hole goes

David Pine

4 minute read

Overview In .NET it’s really easy to create your own interfaces and implementations. Likewise, it’s seemingly effortless to register them for dependency injection. But it is not always obvious how to override existing implementations. Let’s discuss various aspects of “dependency injection” and how you can override the “framework-provided services”. As an example, let’s take a recent story on our product backlog for building a security audit of login attempts. The story involved the capture of attempted usernames along with their corresponding IP addresses.

What happened to my Thread.CurrentPrincipal

This is not the IPrincipal you are looking for...

David Pine

4 minute read

Overview Like the title claims, if you’re using ASP.NET Core and expecting the Thread.CurrentPrincipal or ClaimsPrincipal.Current to be populated you’d be wrong. This is not the IPrincipal you’re looking for. In this post we’ll discuss what happened and what you need to do now. Additionally we’ll cover all the peripheral benefits as a result of this change. History If you have ever done any .NET Framework development, you’ve probably seen the Thread class.

Building a Magic Mirror

Windows 10 IoT Core, UWP, C#, Raspberry Pi 3

David Pine

6 minute read

Inspiration I am certainly not the first one to create a magic mirror, and I will not be the last either. I was inspired by those who are true Innovators…some might say, “I’m standing on the shoulders of giants”. They would probably we right, and I’m okay with that. Earlier this year, I stumbled upon a tweet about someone how created a magic mirror…this is the root of my inspiration. Yup, it is official – I want a mirror like this one!