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

J

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
 
S

Scott Allen

Yes, the breakpoint should be hit. Are you saying the breakpoint is
not being hit?
 
J

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
 
G

gabe garza

http://msdn.microsoft.com/library/d...us/cpgenref/html/gngrfsessionstatesection.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/default.asp?url=/library/en-us/dndotnet/html/introwebforms.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/default.asp?url=/library/en-us/dnpag/html/scalenetchapt15.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

J-T

I'm confused!!!!

gabe garza said:
http://msdn.microsoft.com/library/d...us/cpgenref/html/gngrfsessionstatesection.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/default.asp?url=/library/en-us/dndotnet/html/introwebforms.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/default.asp?url=/library/en-us/dnpag/html/scalenetchapt15.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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top