473,748 Members | 3,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1768
I mean is there anyway to detect in session_onend that code is running due
to IIS restart or timeout....

"abcd" <ab**@abcd.comw rote in message
news:ek******** ******@TK2MSFTN GP03.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.publi c.inetserver.as p.general:
"abcd" <ab**@abcd.comw rote in message
news:ek******** ******@TK2MSFTN GP03.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("fi rstSessionOnEnd ") = "" then
'' do your one time things
application("fi rstSessionOnEnd ") = "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.net wrote in message
news:Xn******** ************@19 4.109.133.242.. .
abcd wrote on 11 jan 2007 in microsoft.publi c.inetserver.as p.general:
>"abcd" <ab**@abcd.comw rote in message
news:ek******* *******@TK2MSFT NGP03.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("fi rstSessionOnEnd ") = "" then
'' do your one time things
application("fi rstSessionOnEnd ") = "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.publi c.inetserver.as p.general:
"Evertjan." <ex************ **@interxnl.net wrote in message
news:Xn******** ************@19 4.109.133.242.. .
>abcd wrote on 11 jan 2007 in microsoft.publi c.inetserver.as p.general:
>>"abcd" <ab**@abcd.comw rote in message
news:ek****** ********@TK2MSF TNGP03.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("fi rstSessionOnEnd ") = "" then
'' do your one time things
application("fi rstSessionOnEnd ") = "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
1652
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 fire, all of them are null, right? Thanks.
3
1547
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 runtime,
1
1227
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 your session means you'll get an error (for the time being). Session is stored in-process, so whenever the WebApp restarts, session is lost so logged on users will get an error.
18
5372
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. After tracing, we find that it should be caused by "ASP.NET Application Restart" (proved by incremented counter for "Application Restarts" of "ASP.NET 1.1.4322" in "Performance" whenever the timeout happens). From MSDN documentation, we find...
1
1602
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 min and the form authentification timeout is set to 120 min. My problem is the following : IIS restart periodically with no reason. The restart occurs :
3
2778
by: ad | last post by:
I want to renew all values of Application and Session. How can I restart application in program?
8
9322
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
2493
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 session_on end is invoked. How can I distguish in global.asa event session_on end that this is natural session time out or explicit IIS restart.... thanks
1
4623
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 contents of the page at runtime via the web interface and we do a XSLT transformation and store the contents of the .aspx pages in the database. The .aspx pages are hooked to a well known code behind in an assembly that is deployed as a assembly in the...
0
8989
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8828
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9537
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9367
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9243
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6795
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2213
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.