[This is preliminary documentation and subject to change]
The Application_OnEnd event occurs when the application quits, after the Session_OnEnd event. Only the Application Object and Server Object built-in objects are available.
<SCRIPT LANGUAGE=ScriptLanguage
RUNAT=Server>
Sub Application_OnEnd
. . .
End Sub
</SCRIPT>
You cannot call the MapPath method in the Application_OnEnd script.
Application_OnStart, Session_OnEnd