Control ASP.NET behavior when background service crashes
When a background service throws an unhandled exception in ExecuteAsync(), you have two options: You can change the behavior if the default isn’t what you want (notice the default behavior changed in .NET 6). In .NET 6+, you can configure the behavior in the initialization code. Here’s an example of making it ignore crashed background … Read more