473,396 Members | 1,915 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,396 software developers and data experts.

Application_End method of Global.asax and Shutting down an asp.net application

J-T
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 of Global.asax and
there is no request for 20 minutes ,dose the breakpoint works for me?

Is there a document which can gives me more infomration in this behaviour?
Thanks
Nov 19 '05 #1
4 3024
Yes, the breakpoint should be hit. Are you saying the breakpoint is
not being hit?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 27 May 2005 12:16:43 -0700, "J-T" <J-*@microsft.com> wrote:
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 of Global.asax and
there is no request for 20 minutes ,dose the breakpoint works for me?

Is there a document which can gives me more infomration in this behaviour?
Thanks


Nov 19 '05 #2
J-T
Yes Scott,
I can not get the breakpoint to hit!!!I'm putting my application in the
application pool of IIS 6.0 and set the shut down to for instance 5 minutes
,but after five minutes nothing happens!!!!

Thanks Scott
"Scott Allen" <sc***@nospam.odetocode.com> wrote in message
news:i8********************************@4ax.com...
Yes, the breakpoint should be hit. Are you saying the breakpoint is
not being hit?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 27 May 2005 12:16:43 -0700, "J-T" <J-*@microsft.com> wrote:
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 of Global.asax and
there is no request for 20 minutes ,dose the breakpoint works for me?

Is there a document which can gives me more infomration in this behaviour?
Thanks

Nov 19 '05 #3
http://msdn.microsoft.com/library/de...atesection.asp
<sessionState mode="Off|InProc|StateServer|SQLServer"
cookieless="true|false"
timeout="number of minutes"
stateConnectionString="tcpip=server:port"
sqlConnectionString="sql connection string"
stateNetworkTimeout="number of seconds"/>

timeout - Specifies the number of minutes a session can be idle before it is
abandoned. The default is 20.

http://msdn.microsoft.com/library/de...rowebforms.asp
Application_End - Fires when the last user in the site's session times out
From the documentation Application_End ONLY FIRES when the LAST USER in
the site's session times out, since the default value is 20 mintues once
http://msdn.microsoft.com/library/de...netchapt15.asp
I noticed this piece of code from the above link.

protected void Application_End(Object sender, EventArgs e){
//release the writer
// Even if this doesn't execute, when the appdomain gets shutdown
//it will be released anyways
if(_writer!=null)
_writer.Close();
}

Just by the wording in the comment section it seems that Application_End
might not always get called on an app shutdown.
"J-T" <J-*@microsft.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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 of Global.asax and
there is no request for 20 minutes ,dose the breakpoint works for me?

Is there a document which can gives me more infomration in this behaviour?
Thanks

Nov 19 '05 #4
J-T
I'm confused!!!!

"gabe garza" <gb*****@yahoo.com> wrote in message
news:w1*******************@newssvr14.news.prodigy. com...
http://msdn.microsoft.com/library/de...atesection.asp
<sessionState mode="Off|InProc|StateServer|SQLServer"
cookieless="true|false"
timeout="number of minutes"
stateConnectionString="tcpip=server:port"
sqlConnectionString="sql connection string"
stateNetworkTimeout="number of seconds"/>

timeout - Specifies the number of minutes a session can be idle before it
is abandoned. The default is 20.

http://msdn.microsoft.com/library/de...rowebforms.asp
Application_End - Fires when the last user in the site's session times
out
From the documentation Application_End ONLY FIRES when the LAST USER in
the site's session times out, since the default value is 20 mintues once
http://msdn.microsoft.com/library/de...netchapt15.asp
I noticed this piece of code from the above link.

protected void Application_End(Object sender, EventArgs e){
//release the writer
// Even if this doesn't execute, when the appdomain gets shutdown
//it will be released anyways
if(_writer!=null)
_writer.Close();
}

Just by the wording in the comment section it seems that Application_End
might not always get called on an app shutdown.
"J-T" <J-*@microsft.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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 of Global.asax and
there is no request for 20 minutes ,dose the breakpoint works for me?

Is there a document which can gives me more infomration in this
behaviour?
Thanks


Nov 19 '05 #5

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...
2
by: Craig | last post by:
Hi, I'm having difficulty understanding how the Application_End event in the Global.asax file gets called. I thought that it's called when the specific web site is stopped via the IIS management...
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...
4
by: Halcyon Woodward | last post by:
I have an odd problem... We have a small development team (three coders) working on the same project (a C# web application). Each coder has a unique 'sandbox' site on a shared Windows 2003...
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...
10
by: newbie | last post by:
My application_end event in global.asax is not working as-is. In order to debug, I want to call it from another file, say debug.aspx through a button, e.g. "end application". How do I call...
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...
2
by: Ido | last post by:
Hi, If asp process is being recycled/restarted gracefully, will Application_End allways be called? In addition, according to : http://www.codecomments.com/archive289-2005-2-393853.html one can...
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: 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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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,...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.