473,689 Members | 2,840 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3039
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.o detocode.com> wrote in message
news:i8******** *************** *********@4ax.c om...
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|InPro c|StateServer|S QLServer"
cookieless="tru e|false"
timeout="number of minutes"
stateConnection String="tcpip=s erver:port"
sqlConnectionSt ring="sql connection string"
stateNetworkTim eout="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!=nul l)
_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******** ********@TK2MSF TNGP10.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******** ***********@new ssvr14.news.pro digy.com...
http://msdn.microsoft.com/library/de...atesection.asp
<sessionState mode="Off|InPro c|StateServer|S QLServer"
cookieless="tru e|false"
timeout="number of minutes"
stateConnection String="tcpip=s erver:port"
sqlConnectionSt ring="sql connection string"
stateNetworkTim eout="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!=nul l)
_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******** ********@TK2MSF TNGP10.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
3163
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 code is never executed (at least when i debug it). Help anyone?
2
7701
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 console. Could anyone please tell me where I can dispose of objects when wanting to stop a specific web site without having to explicitly run IISRESET, as I have other web sites that I am not allowed to reset on the same machine and calling...
3
16119
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 Application_End code? I could of course add a button or something to a form to run the code explicitly, but I want to be sure it is really getting called after 20 minutes. I assume that if I put a breakpoint in my Application_End code, and then run the...
4
7070
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 where they can test the code they write. The majority of the code is written into a stand-alone class library shared via VSS, that is then referenced by each sandbox web (each of which is unique to each user). In the stand-alone class library, we...
4
9207
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 Application_End ever being called. We started logging Application_Start and Application_End events and found that the number is not even: Application_Start happen more often than Application_End. My question is: What are the sutuations in which we should...
10
2897
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 application_end in global.asax from debug.aspx? thanks
0
1294
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 want these threads to empty any remaining messages to disk before exiting. To do so, I'm calling a clean up method in Application_End()
2
3271
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 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?
5
5188
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. When I close the browser, this does not cause the Application_End event to trigger. It also will not occur when I shut down the development server. At this point the application is no longer running, so why didn't the event handler ever get called?...
0
8597
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
8529
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
9077
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
8949
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...
1
8785
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8793
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...
0
7623
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
2
2223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1952
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.