Waiting for your ASP.NET Core app to be ready from an IHostedService in .NET 6

added by DotNetKicks
2/15/2022 10:39:39 AM

299 Views

In this post I describe how you can wait for your ASP.NET Core app to be ready to receive requests from inside an IHostedService/ BackgroundService in .NET 6. This can be useful if your IHostedService needs to send requests to your ASP.NET Core app, if it needs to find the URLs the app is listening on, or if it otherwise needs to wait for the app to be fully started.


0 comments