|
using System;
using System.Diagnostics;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
using PSI;
namespace ConnectionMontiorTest
{
/// <summary>
/// Summary description for Global.
/// </summary>
public class Global : System.Web.HttpApplication
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
public Global()
{
InitializeComponent();
}
protected void Application_Start( Object sender, EventArgs e )
{
}
protected void Session_Start( Object sender, EventArgs e )
{
}
protected void Application_BeginRequest( Object sender, EventArgs e )
{
}
protected void Application_EndRequest( Object sender, EventArgs e )
{
}
protected void Application_AuthenticateRequest( Object sender, EventArgs e )
{
}
protected void Application_Error( Object sender, EventArgs e )
{
}
protected void Session_End( Object sender, EventArgs e )
{
}
protected void Application_End( Object sender, EventArgs e )
{
ConnectionMonitor monitor = Application[ConnectionMonitor.CacheName] as ConnectionMonitor;
if ( monitor != null )
{
EventLog logger = monitor.Logger;
if ( logger != null )
{
monitor.ForceLogging();
logger.WriteEntry( "---Application Ending---", EventLogEntryType.Information );
}
//Uncomment out the following statement to close connections
//that have been opened for longer than 180 seconds
//monitor.Close( 180 );
}
}
#region Web Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Todd has been a professional software developer for over 20 years, working in a variety of different languages including C, C++, C#, Basic, (and this really dates him) COBOL and RPG. He has been working with Microsoft operating systems since the early days of DOS.
He and his wife currently co-own a firm that provides continuing education for CPAs and financial professionals.