Global.asa

Global.asa is a file that contains VBScript (Microsoft® Visual Basic® Scripting) code. It runs on the server and its functions are called by Active Server Pages. The global.asa primarily functions to create the necessary Application and Session objects for sessions that are just beginning, make system services available, and handle impersonation to ensure that a Microsoft IIS thread for a given user is associated with the correct logon credentials.

Global.asa is the starting point for every ASP application and typically contains the following four VBScript functions:

It is not a content file displayed to your site visitors; instead it stores event information and objects used globally by the application. The file must be named Global.asa and be stored in the root directory of the application. Scripts contained in the Global.asa file may be written in any supported scripting language (similar scripting events or objects may be combined inside a single set of <SCRIPT> tags).

The following is an example Global.asa file with empty event scripts:

________________________________________________________

<script language=vbscript runat=server>
SUB Application_OnStart
END SUB
SUB Application_OnEnd
END SUB
SUB Session_OnStart
END SUB
SUB Session_OnEnd
END SUB
</script>

________________________________________________________