The aspnet_wp.exe process is designed to recycle itself (stop and restart)
when it consumes over a certain percentage of the system memory. This is
just to ensure that any memory leaks are occasionally squashed, etc.
Now, this kind of stinks when you have some stuff stored in the Session of a
request, as that is lost (if you are using the InProc Session management,
which is thedefault).
There is no real way to prevent this from happening as far as I know.
However, you can reduce the chances if you do a few things.
First, don't store too much in the session state. I try to only store a few
string or numbers in my session state, and put any other values that I need
to store somewhere else, such as in a DB, or the pages viewstate.
Also, if you need to allow the aspnet_wp.exe process to consume more memory
that it is currently able, you can increase the percentage of the system
memory that it is allowed to take up. This setting can be found in the
machine.config file. (usually in
C:\WINDOWS\Microsoft.NET\Framework\v1.xx.xxx\CONFIG)
Just look for
<configuration>
<system.web>
<process model>
the attribute is "memorylimit". This is a percentage, which is, I beleive
set to 80 by default.
HTH
-Cliff