I'm using a HostedService
inside an ASP.NET core web api
that will be deployed in an IIS instance on premise (.NET Core 2.2)
. I need to ensure that the idle timeout is set to zero to ensure the background service will run continuously and I believe this can be done by setting the idle timeout on the application pool to zero. This would, however, require the IIS
administrator to perform this action upon setup so I was wondering if there is a way to configure kestrel with a zero idle timeout when its first configured in the CreateWebHostBuilder()
method of the program class.
Is this possible?