Ho to get an asp.net hosted service to run automatically on IIS 10?

139 views Asked by At

I'm having trouble with getting my hosted service to run automatically (without a user initiating a request) on IIS 10.

This is an asp.net app, .NET 7 with a React front-end. It's running Signal R and a hosted service.

I have set the start mode to "AlwaysRunning" on the Application Pool. I then set the value of Process Model.Identity to the our windows service user account. The site is configured to run with Windows Authentication and the service user has full privileges on the site folder. A user still has to hit the site's UI in order for the service to start.

Update: Thanks for the help, folks. I did set the idle timeout to 0 and the Application Initialization feature is installed. I don't think the preload option is an option in IIS 10. The service will still not automatically run.

1

There are 1 answers

0
samwu On

You need also to set the site to preloadEnabled=true and install the Application Initialization feature to the Windows installation as per the instructions here.