This blog post explains how when a .Net Core website is hosted in IIS, the website code does not actually get run until the first request comes in to IIS:
This is exactly the behavior that I am seeing, where once the first request comes in, everything starts running. I have a use case where I really need the website code to start as soon as IIS starts. Is there a way to programattically do this from within the website or to use something in configuration, so I do not have to remember to ping my website every time that IIS gets restarted? Thank you.