Application Shutdown in ASP.NET Core with IApplicationLifetime

Learn how to gracefully handle Application Shutdown in ASP.NET Core by looking at the handling of flushing the application insights messages when asp.net core exits

When running an ASP.NET Core web application, there are cases when you need to do some logic when the application stops. An example: you are logging and have to flush the last message to the log (Application Insights). In that case you need can add an event in the Configure method. In this post I show a short example of how doing this.
Continue reading “Application Shutdown in ASP.NET Core with IApplicationLifetime”

Advertisements