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
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