Application State Unload
am 27.07.2007 05:30:00 von Charlie
I have written an ASP.Net web application in C#.
On Appplication_Start the code loads some data
from the database into memory. It stores the data
in Application State variables.
The data is read only. So far so good.
If no one uses the Application for a certain period of time
IIS unloads it from memory. If someone then access the
application the code reloads all the data again into Application
State variables.
This takes about 3 minutes to do. Where is the setting
in IIS or machine.config or app.config or web.config
that determines the time period of inactivity before
IIS unloads an application from memory?
Thanks
Charlie
Re: Application State Unload
am 27.07.2007 07:59:50 von David Wang
On Jul 26, 8:30 pm, Charlie wrote:
> I have written an ASP.Net web application in C#.
> On Appplication_Start the code loads some data
> from the database into memory. It stores the data
> in Application State variables.
> The data is read only. So far so good.
>
> If no one uses the Application for a certain period of time
> IIS unloads it from memory. If someone then access the
> application the code reloads all the data again into Application
> State variables.
>
> This takes about 3 minutes to do. Where is the setting
> in IIS or machine.config or app.config or web.config
> that determines the time period of inactivity before
> IIS unloads an application from memory?
>
> Thanks
> Charlie
Look at IIS6 Process Recycling Options. What you describe (3min) is
not default behavior.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//