Using the COM+ ObjectContext Object to Access the ASP Built-in Objects
Using the COM+ ObjectContext object allows you to control various aspects of your component such as transaction processing, security, and access to the ASP built-in objects. The COM+ ObjectContext object contains methods that return interfaces to the ASP built-in objects.
The following table lists the ASP built-in objects you can access after you create an instance of the COM+ ObjectContext object.
To use the ASP built-in object interfaces from a Visual Basic (VB) component, you must include references in your VB project to the COM+ Services Type Library and the Microsoft Active Server Pages Object Library. In your code, call GetObjectContext.
To use the ASP built-in object interfaces in a script component (scriptlet), you mustcreate an instance of the MTxAS.AppServer.1 object, and then call GetObjectContext.
Related Topics
- For more information and sample code using the COM+ ObjectContext object in VB, see Implementing with Visual Basic.
- For more information and sample code using the COM+ ObjectContext object in a script component, see Implementing with Script Components.
- For information specific to the COM+ ObjectContext object, see the IObjectContext interface section, the ObjectContext object section, and the GetObjectContext function section of the COM+ Programmer's Reference in the Software Developer Kit (SDK).