Apache::ASP Powered by ModPerl & Apache Powered by Apache::ASP
Demo ASP: global_asa_demo.asp 2017-08-19

This example serves as how one may use the global.asa file event handlers. Please see the global.asa file for the code relevant to this example.

The following table lists the sessions that have been recorded in the global.asa file into $Application. When a session ends, its time lived is recorded and displayed below. Active sessions are also listed.

36 Sessions Recorded
16 Active Sessions


006da5... 343 seconds
$VAR1 = {};

00b9e0... 336 seconds
$VAR1 = {};

0122a7... 318 seconds
$VAR1 = {};

016f79... 322 seconds
$VAR1 = {};

0171c0... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1503127569',
          'Count' => '10'
        };

017fc3... 316 seconds
$VAR1 = {};

01b3fc... 303 seconds
$VAR1 = {};

01d879... 308 seconds
$VAR1 = {};

0207d5... 335 seconds
$VAR1 = {};

02a561... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1503127591',
          'Count' => '10'
        };

02d3db... 309 seconds
$VAR1 = {};

0335ea... 353 seconds
$VAR1 = {};

033b75... 328 seconds
$VAR1 = {};

043a82... 310 seconds
$VAR1 = {};

04666f... 314 seconds
$VAR1 = {};

04c578... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1503127427',
          'Count' => '10'
        };

05792a... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1503127724',
          'Count' => '10'
        };

05d5a5... 325 seconds
$VAR1 = {};

064766... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1503127499',
          'Count' => '10'
        };

068aa5... in session
$VAR1 = {
          'Started' => '1',
          'onstart' => '1503127759',
          'Count' => '10'
        };

068c4f... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1503127688',
          'Count' => '10'
        };

06bfc1... 319 seconds
$VAR1 = {};

06d49e... 303 seconds
$VAR1 = {};

078e7c... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1503127535',
          'Count' => '10'
        };

082f54... 304 seconds
$VAR1 = {};

093534... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1503127670',
          'Count' => '10'
        };

09445e... in session
$VAR1 = {
          'Started' => '1',
          'onstart' => '1503127465',
          'Count' => '10'
        };

097793... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1503127634',
          'Count' => '10'
        };

0b1109... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1503127614',
          'Count' => '10'
        };

0bfaa6... in session
$VAR1 = {
          'onstart' => '1503126968',
          'Count' => '10'
        };

0c2555... 347 seconds
$VAR1 = {};

0ca6f1... 336 seconds
$VAR1 = {};

0d23c6... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1503127518',
          'Count' => '10'
        };

0dcb84... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1503127447',
          'Count' => '10'
        };

0ee49f... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1503127552',
          'Count' => '10'
        };

0f731e... 322 seconds
$VAR1 = {};

To see multiple sessions listed you may create a 2nd session by closing and then reopening the browser you are using to view this file, or you may also open a 2nd kind of browser to create this 2nd session. There is only one session-id generated per browser session for an asp application.


Here is a simple use of the Script_OnStart & Script_OnEnd event handlers, keeping track of the number of scripts executed this session:
Scripts Started This Session: 1
Scripts Ended This Session: 0

view this file's source