iis restart and Session _onEnd

iis restart and Session _onEnd

am 11.01.2007 15:46:19 von abcd

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

Re: iis restart and Session _onEnd

am 11.01.2007 15:50:40 von abcd

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:ekl0F9YNHHA.1248@TK2MSFTNGP03.phx.gbl...
> 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
>

Re: iis restart and Session _onEnd

am 11.01.2007 16:16:47 von exjxw.hannivoort

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

> "abcd" wrote in message
> news:ekl0F9YNHHA.1248@TK2MSFTNGP03.phx.gbl...
>> 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)

Re: iis restart and Session _onEnd

am 12.01.2007 19:14:17 von abcd

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:ekl0F9YNHHA.1248@TK2MSFTNGP03.phx.gbl...
>>> 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)

Re: iis restart and Session _onEnd

am 12.01.2007 19:28:13 von exjxw.hannivoort

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:ekl0F9YNHHA.1248@TK2MSFTNGP03.phx.gbl...
>>>> 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)