473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Application_End

Ido
Hi,
If asp process is being recycled/restarted gracefully, will Application_End
allways be called?
In addition, according to :
http://www.codecomments.com/archive2...-2-393853.html one can understand
that Application_End may not be able to finish its execution before the
process is shut-down. That does not sound reasonable to me. What d'you say?

Thanks,
Ido
Feb 12 '06 #1
2 3236
Hi Ido,
If asp process is being recycled/restarted gracefully, will
Application_End allways be called?
When the worker process is recycled, it is shut down, which means, yes,
Application_End will be called.
In addition, according to :
http://www.codecomments.com/archive2...-2-393853.html one can
understand that Application_End may not be able to finish its execution
before the process is shut-down. That does not sound reasonable to me.
What d'you say?
Well, Scott *is* an MVP, but first, to be fair, he didn't state
authoritatively that he knew how much time the process would have to shut
down. He guessed.

I'm not surprised that he guessed either. It took me over an hour to run
down this information for you. Luckily, it's Sunday! Here's the straight
dope:

When the ASP.Net worker process is shut down, there is a time limit set on
how long the server will wait before shutting down the process. How this
time limit is set on an IIS 6 box depends upon the execution model being
used for ASP.Net. By default, ASP.Net apps run in IIS 5 "Worker Process
Isolation Mode." This means that each worker process is run in an IIS 6.0
Application pool. The "Health" tab of the Application Pool Properties dialog
box is used to set the "Shutdown Time Limit" for that pool. This corresponds
to the "shutdowntimeout" value in the <processmodel> section of the
machine.config file, which is used in IIS 5 for all ASP.Net applications,
and in IIS 6 ASP.Net applications running in "IIS 5.0 Isolation Mode."

It should be noted, of course, that one cannot guarantee that the code in
the Application_End method of the global.asax class will complete before the
time limit is reached. Good programming practice would dictate that you
handle the eventuality that it doesn't. Bottom line is, whenever you use
memory to cache data, make sure to account for the eventuality that the data
will disappear for one reason or another.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
We got a sick zebra a hat,
you ultimate tuna.
"Ido" <id*@tgs-systems.com> wrote in message
news:Oc***************@TK2MSFTNGP14.phx.gbl... Hi,
If asp process is being recycled/restarted gracefully, will
Application_End allways be called?
In addition, according to :
http://www.codecomments.com/archive2...-2-393853.html one can
understand that Application_End may not be able to finish its execution
before the process is shut-down. That does not sound reasonable to me.
What d'you say?

Thanks,
Ido

Feb 12 '06 #2
Ido
Thank you so much for that answer.
Just the answer i needed.

Again,thanks,
Ido

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:eS**************@TK2MSFTNGP11.phx.gbl...
Hi Ido,
If asp process is being recycled/restarted gracefully, will
Application_End allways be called?


When the worker process is recycled, it is shut down, which means, yes,
Application_End will be called.
In addition, according to :
http://www.codecomments.com/archive2...-2-393853.html one can
understand that Application_End may not be able to finish its execution
before the process is shut-down. That does not sound reasonable to me.
What d'you say?


Well, Scott *is* an MVP, but first, to be fair, he didn't state
authoritatively that he knew how much time the process would have to shut
down. He guessed.

I'm not surprised that he guessed either. It took me over an hour to run
down this information for you. Luckily, it's Sunday! Here's the straight
dope:

When the ASP.Net worker process is shut down, there is a time limit set on
how long the server will wait before shutting down the process. How this
time limit is set on an IIS 6 box depends upon the execution model being
used for ASP.Net. By default, ASP.Net apps run in IIS 5 "Worker Process
Isolation Mode." This means that each worker process is run in an IIS 6.0
Application pool. The "Health" tab of the Application Pool Properties
dialog box is used to set the "Shutdown Time Limit" for that pool. This
corresponds to the "shutdowntimeout" value in the <processmodel> section
of the machine.config file, which is used in IIS 5 for all ASP.Net
applications, and in IIS 6 ASP.Net applications running in "IIS 5.0
Isolation Mode."

It should be noted, of course, that one cannot guarantee that the code in
the Application_End method of the global.asax class will complete before
the time limit is reached. Good programming practice would dictate that
you handle the eventuality that it doesn't. Bottom line is, whenever you
use memory to cache data, make sure to account for the eventuality that
the data will disappear for one reason or another.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
We got a sick zebra a hat,
you ultimate tuna.
"Ido" <id*@tgs-systems.com> wrote in message
news:Oc***************@TK2MSFTNGP14.phx.gbl...
Hi,
If asp process is being recycled/restarted gracefully, will
Application_End allways be called?
In addition, according to :
http://www.codecomments.com/archive2...-2-393853.html one can
understand that Application_End may not be able to finish its execution
before the process is shut-down. That does not sound reasonable to me.
What d'you say?

Thanks,
Ido


Feb 14 '06 #3

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

Similar topics

1
by: Pedro Duque | last post by:
I've created a .net web service in c#. When there is no open session i need to free some resources. So, I've place the code on the Global.Application_End member. Unffortunatly it seems that the...
0
by: sushi | last post by:
Hello, When is Application_End event called? Actually, I am developing a web application which will start some operation that will continue to run even when the session of all the user's end...
3
by: Jim Owen | last post by:
My .Net book states that the Application_End event handler in Global.asax gets called typically about 20 minutes after the last HTTP request. My question is: what is the best way to debug my...
8
by: Alphonse Giambrone | last post by:
I have a small asp.net web app running on a shared host. It uses a Jet (Access) database. I included a routine to compact the database when the application_event fires if it has not been compacted...
4
by: Vlad Hrybok | last post by:
I am using Application_End to send out a notification about application being unloaded. I found that those notifications are not being sent because the app seems to get unloaded without...
4
by: J-T | last post by:
I have my applciation installed in an appplication pool (a worker process) -IIS 6.0-which is defined to be shut down after 20 minutes of being idle.If I put a breakpoint in Application_End method...
1
by: Navin Mishra | last post by:
Hi, If IIS Application Pool for a web service is called, shouldn't Application_End be called ? Some how I'm not seeing that. I've cached some client connection in Application object and I want...
0
by: Stonie | last post by:
Hi All, I have an asp.net web application that needs to clean up some worker threads on application shutdown. These threads are emptying an in memory buffer of messages to disk. Basically I...
5
by: Tenacious | last post by:
I am trying to shutdown a database server in the Application_End event handler on the Global.asax page. So far I am trying this only on the development server that comes with Visual Studio 2005....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...

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.