COM objects used in ASP pages can have Page, Session, or Application scope depending on how and when they are created. Objects created on ASP pages will have Page scope by default; they are created when the page is processed, and are released when page processing is complete. Objects with Page scope are only available on the page where they are created.
Objects given Session scope or Application scope in the global.asa file or on an ASP page are then available to other ASP pages. Objects that are given Session or Application scope using the Server.CreateObject method must be marked as both apartment and free-threaded. It is possible to create single, apartment, and free-threaded objects in the global.asa file using the extended <OBJECT> tag syntax, but doing so will constrain the Sun Chili!Soft ASP server to a single thread, significantly impacting performance.
For maximum flexibility, all COM objects used on ASP pages should be marked as "Both," and use both the apartment and free-threaded models.
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.