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

Discussion in 'ASP .Net' started by Samuel Stanojevic, Sep 13, 2004.

  1. - 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
    Samuel Stanojevic, Sep 13, 2004
    #1
    1. Advertising

  2. 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...
    Samuel Stanojevic, Sep 15, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QmVsYQ==?=

    Problem with Session_End in Global.asax

    =?Utf-8?B?QmVsYQ==?=, Apr 13, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    3,542
    coollzh
    Apr 13, 2004
  2. =?Utf-8?B?YmNoYXJsZXM=?=

    global.asax and global.asax.cs

    =?Utf-8?B?YmNoYXJsZXM=?=, Oct 4, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    826
    =?Utf-8?B?YmNoYXJsZXM=?=
    Oct 5, 2004
  3. Kim Bach Petersen
    Replies:
    5
    Views:
    15,752
    JamesJM
    Aug 3, 2011
  4. =?Utf-8?B?TWFubnkgQ2hvaGFu?=

    Session_end Global.asax

    =?Utf-8?B?TWFubnkgQ2hvaGFu?=, Aug 5, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    5,321
    =?Utf-8?B?U05ldW1hbm4=?=
    Sep 9, 2005
  5. Mark Rae

    Global.asax / Global.asax.cs in v2

    Mark Rae, May 23, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    3,154
    Mark Rae
    May 23, 2006
Loading...

Share This Page