abcd wrote on 12 jan 2007 in microsoft.public.inetserver.asp.general:
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
>abcd wrote on 11 jan 2007 in microsoft.public.inetserver.asp.general:
>>"abcd" <ab**@abcd.comwrote in message
news:ek**************@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)