0

I am running an ASP.Net Core 3.1 web application under IIS. It works as expected except for one thing. The application does not startup until an endpoint has been hit.

This is not a problem on the initial startup as I can just trigger an endpoint as part of the installation scripts. The problem is when there is a service interruption which causes the application to stop. My app pre-loads data on startup in order to improve performance (using IHostedService implementations) and this now does not happen until someone is actually trying to use the service.

I was wondering if there is either an IIS or ASP.Net setting I could use so that the application will automatically start up as soon as the IIS web site is running. The best I can think of at the moment is having a separate application poll a liveness endpoint.

1
  • 1
    You can try this answer, it should help. thanks! Sep 17, 2021 at 20:17

1 Answer 1

1

If you are running IIS 7.5 or higher, this is doable by configuring both the app pool start mode and setting the app/site to preload. See this existing answer: https://stackoverflow.com/a/47199169/203172

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.