iis restart and Session _onEnd

A

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
 
A

abcd

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

Evertjan.

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

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

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. said:
abcd wrote on 11 jan 2007 in microsoft.public.inetserver.asp.general:

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

Evertjan.

abcd wrote on 12 jan 2007 in microsoft.public.inetserver.asp.general:
Evertjan. said:
abcd wrote on 11 jan 2007 in microsoft.public.inetserver.asp.general:
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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top