Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to force an Application Start when an Application Pool is recycled?

I'm wondering if there is a way to automagically fire off an Application Start for a web site/application whenever the Application Pool for that site is recycled?

Are there any canned solutions for this problem?

I would really like to avoid having one of my end users have to go through the application start of the site if they can avoid it.

like image 704
Joseph Avatar asked Oct 29 '10 18:10

Joseph


1 Answers

If you are using .NET 4 you can.

<applicationPools>
     <add name="MyAppWorkerProcess" managedRuntimeVersion="v4.0" startMode="AlwaysRunning" />
</applicationPools> 

See more information at ScottGu's article Auto-Start ASP.NET Applications.

Other than this I have heard of people writing a service to make a request every few minutes. A little overkill, imo, but depends on your need.

like image 154
Dustin Laine Avatar answered Sep 28 '22 12:09

Dustin Laine