472,364 Members | 2,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,364 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 2963
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....
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
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
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
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...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
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...

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.