Changing the value of Session.Timeout triggers a call to Global.asax.Session_End function at end of

S

Samuel Stanojevic

- I'm using .NET Framework 1.1.

I just noticed that whenever I change the value of Session.Timeout (no
matter which aspx page this happens on), at the end of the request,
the 'Session_End' function gets called in my global.asax code. --More
specifically, it only happens when the page is setting the value of
the timeout to a value different than what it currently is.-- Yet,
the session remains alive, and any variables stored in the Session
object remain available to my next requests. It's as if it's not a
"real" end of session, and that the firing of the 'Session_End' method
call is just an unfortunate side-effect of perhaps some bug in the
framework.

This causes a serious bug in my code because I perform some clean-up
of resources in the Session_End, but since the session is not really
over, the following requests try to access the resources that no
longer exist because I performed the clean up.

Has anyone experienced this? Is this a bug or as designed? And if it
is by design (I sure hope it isn't), then I would like to know how I
can distinguish a 'Session-End' call that really means the end of the
session vs. one that simply means I just changed the timeout setting.

And just in case someone raises the question... the reason our aspx
pages change the session timeout setting is because some pages have
more form fields than others and therefore take longer to fill out by
users. In such cases, it is desirable to us that we temporarily make
the session timeout longer for such pages, to allow users enough time
to fill out the form without losing their work.

Thanks in advance
Sam
 
S

Samuel Stanojevic

nobody has any ideas? It seems like a pretty fundamental problem to
me. I'm surprised I didn't find any posts on the subject before...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top