Luke101
Luke101

Reputation: 65248

How to make an asp.net mvc application to stay compiled

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?

Upvotes: 0

Views: 185

Answers (3)

Nate Dudek
Nate Dudek

Reputation: 1265

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

Upvotes: 0

rtalbot
rtalbot

Reputation: 1645

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: Worker process recycles because it reached its virtual memory limit

Upvotes: 0

Josh E
Josh E

Reputation: 7432

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.

Upvotes: 1

Related Questions