ASP 101 - Active Server Pages 101 - Web04
The Place ASP Developers Go!

Windows Technology Windows Technology
15 Seconds
ASP 101
ASP Wire
VB Forums
VB Wire
internet.commerce internet.commerce
Partners & Affiliates
ASP 101 is an site
ASP 101 is an site
Internet News
Small Business
Personal Technology

Corporate Info
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash

 Top ASP 101 Stories Top ASP 101 Stories
Connections, Commands, And Procedures
What is ASP?
VBScript Classes: Part 1 of N

ASP and Personal Web Server
Show All Tips >>
ASP 101 RSS Feed ASP 101 Updates

Quick Tips

Global.asa OnEnd Events Don't Run

I continually get questions concerning the Application_OnEnd and Session_OnEnd event handlers in global.asa not running. The problem is usually not that the server isn't set up right or that it's broken. It's usually something much simpler.

What developers tend to forget that the OnEnd events have no way to tell you when something's wrong. This is understandable since all the other pages on a web site and even the Application_OnStart and Session_OnStart don't have this problem. It stems from the fact that the OnEnd events execute long after the user has left so there's no browser to send an error message to. As a result, you might never know there's a problem with your code and the smallest bug or typo can cause the whole routine to not execute at all.

Because of this, you really need to be extra careful when writing or modifying code for these particular subroutines. I recommend adding a set of code with noticable results at the end of the routine during testing. For live code, some decent error handling will help catch those run time errors that seem to "just happen" on their own.

Previous      Show All Tips      Next

If you have a tip you would like to submit, please send it to:

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback
The Network for Technology Professionals



Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers