I have an ASP.NET Core website hosted on IIS. This site uses a IHostedService added with services.AddHostedService method. I set up IIS App pool to "AlwaysRunning" and "0" to Idle time-out.
The thing I need is to run this service right after the AppPool (and IIS) starts. However, it starts after I access any page of it. I understand, that this case is when app is created or whatever.
Is there any way to start the website automatically and keep it online?