In this post, I want to describe an approach to allow anonymous access to a health check endpoint, added using the MapHealthChecks extension on EndpointRouting. I’ll also cover how to make changes to custom middleware so that it doesn’t apply to endpoints which allow anonymous access. The scenario is based on one that I encountered […]
Tag: middleware
HttpClientFactory in ASP.NET Core 2.1 (Part 3) Outgoing request middleware with handlers.
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 IHttpClientFactory feature in ASP.NET Core 2.1. It’s been a while since those first two posts but I’d like to continue this series by looking […]
ASP.NET Core Correlation IDs Writing a basic middleware library to enable correlation IDs on ASP.NET Core
On a recent project we needed to implement the concept of correlation IDs across some ASP.NET Core API services. In our scenario we have an API service called from a front end JavaScript application which will then call one or more secondary back end API services to gather data. This is becoming a pretty common […]
ASP.NET Core Anatomy (Part 4) – Invoking the MVC Middleware Dissecting and understanding the internals of ASP.NET Core
In the first three parts of this series I looked at what happens when we call AddMvcCore, AddMvc and UseMvc as part of the application startup. Once the MVC services and middleware have been registered in our ASP.NET Core application, MVC is now available to handle HTTP requests. In this post I want to cover the […]