472,371 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,371 software developers and data experts.

iis restart and Session _onEnd

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
Jan 11 '07 #1
4 1715
I mean is there anyway to detect in session_onend that code is running due
to IIS restart or timeout....

"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.

thanks

Jan 11 '07 #2
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

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 11 '07 #3
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." <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

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Jan 12 '07 #4
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)
Jan 12 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: LL | last post by:
Hi, I use Applicaiton lever variable like this: Application = xxx; Do I need to restart the WWW service every time to reset it? I also have several Session variables. When Session_End event...
3
by: Ali.M | last post by:
Hi, I heared that one of IIS6 new capabilities is it can keep all session state variables when I restart the IIS. When I change web.config and save it during the asp.net application...
1
by: Steven Spits | last post by:
Hi group, We have installed our first ASP.NET WebApp on our preproduction server. The site stores some general user information in session variables that are needed in every page. So loosing...
18
by: amdishigh | last post by:
We are experiencing the following problems concerning ASP.NET: our ASP.NET application, written in .NET 1.1 platform, and hosted in IIS 5.0 environment, experience frequent session timeout problem....
1
by: Christian | last post by:
Hi, I have a Windows Server 2003 with IIS 6.0 et dotnet 1.1 I have an asp.net application on that server with no more than 30 users a day. In my web.config the session timeout is set to 180...
3
by: ad | last post by:
I want to renew all values of Application and Session. How can I restart application in program?
8
by: kenneth fleckenstein nielsen | last post by:
hi guru's I want to restart my webservice when ever it throws an exception that isn't cought. can i do that by web.config or iss or how ??
1
by: abcd | last post by:
I am using classic ASP. When the session times out theglobal.asa event called session_on end is invoked which is absolutely correct. When I explicitely do IIS reset or iis restart then again...
1
by: Sriram Srivatsan | last post by:
Hi We are trying to build an application where we render some of the .aspx pages from the database using a class derived from System.Web.Hosting.VirtualPathProvider. Users configure the...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.