G
Guest
It is my understanding that when a session timeout occurs, the servicing
thread will be terminated by IIS. However, I did a simple test and made a
test page with a single button; when clicked, the button will go into a loop,
making an INSERT into a database; loop length is long.MaxValue. I then set
session timeout to 2 mins in web.config. In session_end (global.asax), I
created a procedure that inserts to a separate log table. I launched the page
and clicked the test button. Approx. after 2 minutes, session timeout is
fired (evidence is insert made to separate log table). However, the button
procedure kept on running and was not terminated (as I would've expected).
The reason I went to all this trouble is that I have a component that can
run for potentially lengthy periods, and I wanted to see the impact of
session timeout on running threads servicing web requests. Is the behavior I
just recorded the way things should really run? Can I depend on this behavior
to be consistent?
thread will be terminated by IIS. However, I did a simple test and made a
test page with a single button; when clicked, the button will go into a loop,
making an INSERT into a database; loop length is long.MaxValue. I then set
session timeout to 2 mins in web.config. In session_end (global.asax), I
created a procedure that inserts to a separate log table. I launched the page
and clicked the test button. Approx. after 2 minutes, session timeout is
fired (evidence is insert made to separate log table). However, the button
procedure kept on running and was not terminated (as I would've expected).
The reason I went to all this trouble is that I have a component that can
run for potentially lengthy periods, and I wanted to see the impact of
session timeout on running threads servicing web requests. Is the behavior I
just recorded the way things should really run? Can I depend on this behavior
to be consistent?