views:

34

answers:

3

I have precompiled my application but every 10 - 30 min it unloads then when the page is hit it takes a long time to load. How do I make the application stay compiled forever?

+1  A: 

It's not like the application is getting un-compiled, just that the worker process (and the app domain) is being unloaded from memory.

In your app pool settings in IIS, set the idle timeout for whatever time you need, or set it to never recycle due to idleness.

Josh E
A: 

In addition to Josh's recommendation, check memory usage in case you're running up against the worker process memory limit and not a time-out.

Related question: http://stackoverflow.com/questions/381088/worker-process-recycles-because-it-reached-its-virtual-memory-limit

rtalbot
A: 

If you're using .NET 4 and IIS 7.5, you can also use the new "Auto-Start" feature to avoid the initial load times.

http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx

Nate Dudek