<%@ Language=VBScript %> Application Object Introduction

  Application Object Introduction

Displaying contents of application object
<%Response.Write "The application object contents collection contains these " & application.contents.count & " variables:
" for each i in Application.Contents If IsObject(Application.Contents(i)) Then Response.Write "  Object reference: " & i & "
" Elseif IsArray(Application.Contents(i)) Then Response.Write "  Array: " & i & "
" Else Response.Write "  Variable: " & i & "=" & Application.Contents(i) & "
" End If next %>
Notes 
For meaning of fields in the application object, see the page on Poor Mans Audit 

The AppTotalSessions is updated whenever a session is created. This is done automatically in the Session OnStart event. It can be used to learn more about just what constitutes an ASP session. For example, open the same web page in different web browsers. Each web browser should be a separate entity and each start its own session. Try it. See page about Session object.

An application is defined in IIS administering tool, part of MMC in NT4. A subdirectory under the default web site is just a subdirectory if it looks like a folder would in Windows Explorer. A subdirectory however, that looks like a box with a ball in it is an application. When developing with Visual Interdev, you get clear and obvious indication of whether you are starting a new application. However, if developing with an HTML based product such as Front Page, you have to worry about this.

Closing your browser does not end a session. However, starting it up again and using the same application will start a new session. The old session is gone and will eventually time out. 

Stopping PWS on NT4 workstation does not drive the Session_onEnd event for each active session! In addition it does not even kill the application object! 

Session IDs are assigned sequentially with PWS on NT4 workstation. That is, if the last Session ID was 123, the next one would be 124. On IIS4?  On IIS5?  

A Session_onStart event can add a new variable to the application object. The variables in the contents collection of the application object do not have to be declared (DIMed) in the Application_onStart event beforehand. 

To Do
Make this page not part of a session or it would always clobber it.