ASP.Net how to automatically launch an application without first requesting a user to the server?

I have scheduled tasks that need to be run in Application_Start, but as far as I know, this method only starts after the first request. In any case, can I just start the application after stopping and start the connection in IIS or stop / start / restart the site?

+4
source share
1 answer

If you are running IIS 7.5, you can configure the application to start automatically, as you can see on this page on ScottGu's blog .

Basically, you should add the startMode="AlwaysRunning" attribute to the application host configuration file in the production application process record.

+1
source

All Articles