Easy Tutorial
❮ Prop Scripttimeout Met Abandon ❯

ASP Application_OnStart and Application_OnEnd Events



Application_OnStart Event

The Application_OnStart event occurs before the first new session is created (when the Application object is first referenced).

This event is placed in the Global.asa file.

Note: Referencing the Session, Request, or Response objects in the Application_OnStart event script will cause an error.

Application_OnEnd Event

The Application_OnEnd event occurs when the application ends (when the web server stops running).

This event is placed in the Global.asa file.

Note: The MapPath method cannot be used in the Application_OnEnd code.

Syntax


Example

Global.asa:

Displaying the number of current visitors in an ASP file:


❮ Prop Scripttimeout Met Abandon ❯