iis restart and Session _onEnd

Discussion in 'ASP General' started by abcd, Jan 11, 2007.

  1. abcd

    abcd Guest

    When IIS is restarted session_onEnd is called. though the debugger is not
    available at this point in Session_onEnd, is there any way that the code in
    session_onEnd is running due to iis restart and not from the timeout.

    thanks
     
    abcd, Jan 11, 2007
    #1
    1. Advertising

  2. abcd

    abcd Guest

    I mean is there anyway to detect in session_onend that code is running due
    to IIS restart or timeout....

    "abcd" <> wrote in message
    news:...
    > When IIS is restarted session_onEnd is called. though the debugger is not
    > available at this point in Session_onEnd, is there any way that the code
    > in session_onEnd is running due to iis restart and not from the timeout.
    >
    > thanks
    >
     
    abcd, Jan 11, 2007
    #2
    1. Advertising

  3. abcd

    Evertjan. Guest

    abcd wrote on 11 jan 2007 in microsoft.public.inetserver.asp.general:

    > "abcd" <> wrote in message
    > news:...
    >> When IIS is restarted session_onEnd is called. though the debugger is
    >> not available at this point in Session_onEnd, is there any way that
    >> the code in session_onEnd is running due to iis restart and not from
    >> the timeout.


    [Please do not toppost on usenet even your own posting]

    > I mean is there anyway to detect in session_onend that code is running
    > due to IIS restart


    > or timeout....


    [The session can also end by software command.]

    try:

    if application("firstSessionOnEnd") = "" then
    '' do your one time things
    application("firstSessionOnEnd") = "hasFiredBefore"
    else
    '' do things that you only want to do at later times
    end if



    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Jan 11, 2007
    #3
  4. abcd

    abcd Guest

    thanks Evertjan. But how this will help me to detect the differnce bettween
    timeout and explicit IIS restart...in both situations code in session_onend
    runs




    "Evertjan." <> wrote in message
    news:Xns98B5A59B9ACEEeejj99@194.109.133.242...
    > abcd wrote on 11 jan 2007 in microsoft.public.inetserver.asp.general:
    >
    >> "abcd" <> wrote in message
    >> news:...
    >>> When IIS is restarted session_onEnd is called. though the debugger is
    >>> not available at this point in Session_onEnd, is there any way that
    >>> the code in session_onEnd is running due to iis restart and not from
    >>> the timeout.

    >
    > [Please do not toppost on usenet even your own posting]
    >
    >> I mean is there anyway to detect in session_onend that code is running
    >> due to IIS restart

    >
    >> or timeout....

    >
    > [The session can also end by software command.]
    >
    > try:
    >
    > if application("firstSessionOnEnd") = "" then
    > '' do your one time things
    > application("firstSessionOnEnd") = "hasFiredBefore"
    > else
    > '' do things that you only want to do at later times
    > end if
    >
    >
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Please change the x'es to dots in my emailaddress)
     
    abcd, Jan 12, 2007
    #4
  5. abcd

    Evertjan. Guest

    abcd wrote on 12 jan 2007 in microsoft.public.inetserver.asp.general:

    > "Evertjan." <> wrote in message
    > news:Xns98B5A59B9ACEEeejj99@194.109.133.242...
    >> abcd wrote on 11 jan 2007 in microsoft.public.inetserver.asp.general:
    >>
    >>> "abcd" <> wrote in message
    >>> news:...
    >>>> When IIS is restarted session_onEnd is called. though the debugger
    >>>> is not available at this point in Session_onEnd, is there any way
    >>>> that the code in session_onEnd is running due to iis restart and
    >>>> not from the timeout.

    >>
    >> [Please do not toppost on usenet even your own posting]
    >>
    >>> I mean is there anyway to detect in session_onend that code is
    >>> running due to IIS restart

    >>
    >>> or timeout....

    >>
    >> [The session can also end by software command.]
    >>
    >> try:
    >>
    >> if application("firstSessionOnEnd") = "" then
    >> '' do your one time things
    >> application("firstSessionOnEnd") = "hasFiredBefore"
    >> else
    >> '' do things that you only want to do at later times
    >> end if



    > thanks Evertjan. But how this will help me to detect the differnce
    > bettween timeout and explicit IIS restart...in both situations code in
    > session_onend runs


    I agree. My example would not work. However:

    Further thinking brings me to doubt your first point.

    Say:

    1 The server stops because the power fails.
    2 The server restarts manually or automaticly.
    3 So IIS restarts.

    Question:

    The Session_onEnd of what session is executed?
    Of all sessions that existed before the crash?

    =====

    It is a longtime adagium in this NG never to use Session_onEnd for
    serious business, you cannot trust it.

    ==============

    Answer: It destroys the order of the conversation
    Question: Why?
    Answer: Top-Posting.
    Question: Whats the most annoying thing on Usenet?

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Jan 12, 2007
    #5
    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. Guest

    web config change and IIS restart

    Guest, May 6, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    10,332
    William F. Robertson, Jr.
    May 6, 2004
  2. Tony Cheng

    IIS restart and dll cache problem

    Tony Cheng, Dec 10, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    658
    Tony Cheng
    Dec 10, 2004
  3. =?Utf-8?B?Um9iSEs=?=
    Replies:
    4
    Views:
    5,383
    =?Utf-8?B?Um9iSEs=?=
    Apr 11, 2007
  4. abcd

    IIS restart + Session Time out

    abcd, Oct 16, 2006, in forum: ASP General
    Replies:
    1
    Views:
    122
    Firas
    Oct 17, 2006
  5. Josef Moellers

    Restart Perl Application upon KDE Restart

    Josef Moellers, Jul 18, 2013, in forum: Perl Misc
    Replies:
    18
    Views:
    299
    Adam H. Kerman
    Jul 26, 2013
Loading...

Share This Page