The Session_OnStart Function

The Session_OnStart function is called by Active Server Pages the first time a user request for this application arrives from a browser.

This function initializes the impersonation handle, the handle to the security context.

Session("hImp") = Empty

The impersonation handle on the Session object is initialized with the preceding call. Strictly speaking, this call is unnecessary because this handle is empty before it is set. This call is used to remind the developer that the hImp variable needs to be reset later in the Session_OnEnd function.

Set Session("AMSession") = Nothing

If logon.inc is later used, this cannot be set to Empty; rather, set it to Nothing. For more information, see the Active Server Pages and VBScript documentation.