다음을 통해 공유


Restricting Object Scope

Generally, you should not store objects created from an COM component in the ASP Application or Session objects. COM objects are deactivated when the transaction is completed. Because the Session and Application objects are intended for object instances that can be used across multiple ASP pages, you should not use them to hold objects that will be released at the end of a transaction.

An ASP script is the root, or start, of a declared transaction. Any COM object used on a transactional ASP page is considered part of the transaction. When the transaction is completed, COM objects used on the page are deactivated, including objects stored in the Session or Application object. Subsequent attempts to call the session-scope or application-scope object from another transactional page will fail.