Ask a Question related to ASP.NET General, Design and Development.
-
Jim Owen #1
Global.asax Application_End questions
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
application from within VS.Net, that 20 minutes later my breakpoint isn't
going to get hit and suddenly I can step through it. Lastly, what the code
does is update the database with the current application cache, and I want
this to happen right afdter I exit the application, not 20 minutes later,
while I'm developing the app, I'm going in and out all the time and 20
minutes won't pass without an HTTP request pretty much all day.
How is this stuff typically handled?
--
- Jim Owen
206-501-6936
Jim Owen Guest
-
global.asax
Hi all! I've created a simple aspx application and when I run it locally on my pc all works fine. If I move it on the web server I get the... -
Name of events in Global.asax
Hi. Reading the docs about the Global.asax events I noticed the names used on the help are not the same on the file. For example, the docs talk... -
Global Error handling in Applicatio_Error() of Global.asax
Hi all, For a web application if we are using web farm, and if i want to do Global Error handling can i use Applicatio_Error() method in... -
What is Global.asax?
It's the class file definition code for the Session and Application events - if you have anything that should be done when a user first connects or... -
Global ASAX error
Sounds like references have been removed from your web.config file. Look in your web.config file under... -
David Waz.. #2
Global.asax Application_End questions
that's the nature of the beast... you don't know when the
application will end.
You said "when I exit the application" - that event
doesn't happen. you close the browser, but you
don't "Exit" a web application... not unless you have a
button that says "Exit Application" - and of course,
that's silly.
You can either sit in the debugger, waiting for the app to
die, add a button to simulate the event, or just add a
button that calls your end-of-application routines to test
it, then implement the code and all should be A-ok
handler in Global.asax>-----Original Message-----
>My .Net book states that the Application_End eventHTTP request. My>gets called typically about 20 minutes after the lastApplication_End code? I could>question is: what is the best way to debug mycode explicitly,>of course add a button or something to a form to run the20 minutes. I assume>but I want to be sure it is really getting called afterand then run the>that if I put a breakpoint in my Application_End code,breakpoint isn't>application from within VS.Net, that 20 minutes later myLastly, what the code>going to get hit and suddenly I can step through it.cache, and I want>does is update the database with the current application20 minutes later,>this to happen right afdter I exit the application, notthe time and 20>while I'm developing the app, I'm going in and out allall day.>minutes won't pass without an HTTP request pretty much>
>How is this stuff typically handled?
>
>--
>- Jim Owen
>206-501-6936
>
>
>.
>David Waz.. Guest
-
Kevin Spencer #3
Re: Global.asax Application_End questions
You want the Session_End event, not the Application_End event. The
Session_End Event occurs whenever a single user Session ends. As you pointed
out, in a web site with many users accessing it every day, the
Application_End Event may never fire. In either case you're going to have to
wait. There's no way to force it from the browser side. If the user
navigates away, or closes their browser, the server has no way of knowing
this (HTTP is stateless). When the Session times out, the event will fire.
HTH,
Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
[url]http://www.takempis.com[/url]
Some things just happen.
Everything else occurs.
"Jim Owen" <jkoseattle@comcast.net> wrote in message
news:epjXzXZQDHA.2424@tk2msftngp13.phx.gbl...could> 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? Iassume> 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> that if I put a breakpoint in my Application_End code, and then run the
> application from within VS.Net, that 20 minutes later my breakpoint isn't
> going to get hit and suddenly I can step through it. Lastly, what the code
> does is update the database with the current application cache, and I want
> this to happen right afdter I exit the application, not 20 minutes later,
> while I'm developing the app, I'm going in and out all the time and 20
> minutes won't pass without an HTTP request pretty much all day.
>
> How is this stuff typically handled?
>
> --
> - Jim Owen
> 206-501-6936
>
>
Kevin Spencer Guest
-
Jim Owen #4
Re: Global.asax Application_End questions
Well now I'm quite confused. I have been able to debug my Application_End
code and it works fine. Then just for grins I put a breakpoint in there and
let the browser sit there while I ate lunch, and it never hit my
Application_End code. What am I doing wrong? All I've done is put a call to
a method in the Global.asax file under Application_End.
--
- Jim Owen
206-501-6936
"David Waz.." <dlw@pickpro.com> wrote in message
news:531701c34197$7a4b7ae0$a401280a@phx.gbl...> that's the nature of the beast... you don't know when the
> application will end.
>
> You said "when I exit the application" - that event
> doesn't happen. you close the browser, but you
> don't "Exit" a web application... not unless you have a
> button that says "Exit Application" - and of course,
> that's silly.
>
> You can either sit in the debugger, waiting for the app to
> die, add a button to simulate the event, or just add a
> button that calls your end-of-application routines to test
> it, then implement the code and all should be A-ok
>
>> handler in Global.asax> >-----Original Message-----
> >My .Net book states that the Application_End event> HTTP request. My> >gets called typically about 20 minutes after the last> Application_End code? I could> >question is: what is the best way to debug my> code explicitly,> >of course add a button or something to a form to run the> 20 minutes. I assume> >but I want to be sure it is really getting called after> and then run the> >that if I put a breakpoint in my Application_End code,> breakpoint isn't> >application from within VS.Net, that 20 minutes later my> Lastly, what the code> >going to get hit and suddenly I can step through it.> cache, and I want> >does is update the database with the current application> 20 minutes later,> >this to happen right afdter I exit the application, not> the time and 20> >while I'm developing the app, I'm going in and out all> all day.> >minutes won't pass without an HTTP request pretty much> >
> >How is this stuff typically handled?
> >
> >--
> >- Jim Owen
> >206-501-6936
> >
> >
> >.
> >
Jim Owen Guest



Reply With Quote

