HttpClientFactory in ASP.NET Core 2.1 (Part 2)
In my last post – An introduction to HttpClientFactory – I explained some of the reasons behind the creation of the feature. We looked at what problems it helps solve and then followed a very basic...
View ArticleASP.NET Core Gotchas – No. 4
I was upgrading a quite mature ASP.NET Core 1.0 project to ASP.NET Core 2.0 today and ran into an odd issue which took me a good half hour to track down. After working my way through the various...
View ArticleASP.NET Core Anatomy Index
This post acts as an index of the various ASP.NET Core anatomy posts I have written. Each of these deeps dives into the ASP.NET Core code base to understand how the internals work. Part 1 – What...
View ArticleASP.NET Core Anatomy – How does UseStartup work?
I was recently explaining to someone the basics of the program flow for an ASP.NET Core application. One of the things included in the templates for ASP.NET Core and used very often is the...
View ArticleUpgrading an ASP.NET Core 2.0 application to ASP.NET Core 2.1 (preview 1)
The first official preview of ASP.NET Core 2.1 was released yesterday. I’ve been playing around with the nightly builds for various parts of ASP.NET Core 2.1 for the last few months and finally I was...
View ArticleUsing HostBuilder and the Generic Host in .NET Core Microservices
TL;DR; The “generic” Host and HostBuilder are components of a new feature set coming with the release of .NET Core 2.1. A use case of them is to simplify the creation of console based services by...
View ArticleASP.NET Core Dependency Injection – How to Register Generic Types
Since its release, ASP.NET Core has shipped with a “basic” Dependency Injection (DI) container included. This supports the functionality required to run the framework which was built from the ground up...
View ArticleUpdates to my ASP.NET Core Correlation ID Library
Back in May 2017 I blogged about creating a simple library which supports passing correlation IDs between ASP.NET Core micro-services. The library came about because of a basic requirement we had at...
View ArticleLibrary Manager (LibMan) in Visual Studio 2017 (15.7)
I recently started working on an ASP.NET Core 2.1 Preview 2 sample project. Having been mostly API focused recently, it was the first time that I’d done much with a site that actually renders views for...
View ArticleHttpClientFactory in ASP.NET Core 2.1 (Part 3)
In my previous posts in this series (An Introduction to HttpClientFactory and Defining Named and Typed Clients) I introduced some core concepts and then showed some examples of using the new...
View ArticleASP.NET Core Dependency Injection – Registering Multiple Implementations of...
In a previous post I covered registering generic types with Dependency Injection. This is one of the less common (and less documented) ways in which services could be registered with the Microsoft DI...
View ArticleContributing to the Microsoft ASP.NET Documentation
Back in February I spotted an issue on the ASP.NET Core Docs repository. The issue was a requirement for new documentation about the IHttpClientFactory feature being added in ASP.NET Core 2.1. I’d been...
View ArticleASP.NET Core Dependency Injection – Registering Implementations Using Delegates
Today I want to continue my series (see links at the end of this post) of posts focusing on the Microsoft dependency injection library included by default in new ASP.NET Core projects. In this post I...
View Article.NET South East – May Event
It’s been a while since I last got around to blogging about a .NET South East meetup event. I wanted to make sure I did this month as the plan for this week’s event was close to my heart. I had the...
View ArticleHttpClientFactory in ASP.NET Core 2.1 (Part 4)
In the previous post in this series, I introduced the concept of outgoing middleware using DelegatingHandlers registered with named and typed clients. While that approach is available, the ASP.NET team...
View ArticleHow to record metrics to DataDog from ASP.NET Core
I’m currently architecting and building a new microservices based system at work. A priority of mine has been to learn from the experience of building our first microservices project by putting a...
View ArticleIHttpClientFactory Patterns: Using Typed Clients from Singleton Services
I’ve been following IHttpClientFactory for some time and have created a number of blog posts on the various features based on sample applications. Since then; with the release of ASP.NET Core 2.1 now...
View ArticleHttpClientFactory in ASP.NET Core 2.1 (Part 5): Logging
In the 2.1 release of IHttpClientFactory, the ASP.NET team included some built-in logging of the HTTP calls made via HttpClients created by the factory. This can be useful for the diagnosis of...
View ArticleWorking with Polly – Using the Context to Obtain the Retry Count for Diagnostics
I’ve been using Polly for a number of years now. For the most part, my usage of the library has been to solve some quite basic problems; commonly to implement retry logic when calling external services...
View ArticleRunning a .NET Core Generic Host App as a Windows Service
I received a question at the weekend via a comment from Vadim on my Implementing IHostedService in ASP.NET Core 2.0 post. Vadim asked the following: We have a lot of console applications that are...
View Article