Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wire-up Global.asax events?

Status
Not open for further replies.

LauraCairns

Programmer
Jul 26, 2004
173
0
0
GB
Do I have to wire up the events in a global.asax file. I just realised this might be why my session isn;t working correctly. I have code in the following 3 events: -
Session_End
Application_Error
Session_Start

Does anyone know how i wire them up and if this could be the cause of my problem.

#region Web Form Designer generated code
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
}
 
As far as I know you don't wireup events in global. If you post a specific problem you're having, it might be easier to get an idea of what's going on. One thing that might be useful to know is that you will generally only rarely see code execute in Session_End or Application_Error from the debugger. Session_end actually fires after x minutes from when the last request was processed on the server (the time x is specified in the web.config file). Therefore, the debugger generally can't reliably get a handle on it unless you abandon the session in-code by calling Session.Abandon. Also, if you terminate the session (for instance, by stopping the debugger if you launched the application from within Visual Studio), I've noticed the session doesn't clean up correctly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top