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.

ASP.NET Core Response Optimization

Static File Caching & Compression

David Pine

6 minute read

Intro If you’re a web developer, chances are you’re familiar with optimization strategies such as static file caching and response compression. I recently implemented these two concepts in tandem on an ASP.NET Core application that I have been developing… I’m going to share what I have learned. If you haven’t had a chance to use ASP.NET Core yet, you’re missing out! As my friend Scott Addie likes to say: ASP.NET Core is a cafeteria plan in which developers choose application dependencies à la carte.

The power of the global.json

Leveraging .NET Core Tooling Features

David Pine

3 minute read

Introduction As I’m sure you’re all aware by now, Monday June 27th was a special day for those of you who were anticipating the release of .NET Core and ASP.NET Core. While the “core” frameworks and runtimes are RTM, the tooling is actually still in preview. In fact, we’re currently on Tools Preview 2. I wanted to focus this post entirely on one specific enhancement to Visual Studio solutions, enter the global.json.