[This is preliminary documentation and subject to change]

# Accessing ASP Built-in Objects from ASP Pages

Using Active Server Pages (ASP) built-in objects, you can access all available information regarding the Web server, the user who is accessing a Web page, the Web application that contains the Web page, and the fields in the HTTP request and response stream. You can access this information from a Web page, a COM component, or an ISAPI application.

Language | Method
--- | ---
ISAPI application | Use the C++ interfaces for the ASP built-in objects.
C++ COM component | Use the C++ interfaces for the ASP built-in objects.
Java application | Use the Java classes for the ASP built-in objects.
Visual Basic(VB) component | Use the COM+ ObjectContext object by calling GetObjectContext. This requires a project reference to the COM+ Services Type Library and the Microsoft Active Server Pages Object Library.
Script component (scriptlet) | Use the COM+ ObjectContext object by calling the GetObjectContext method of the MTxAS.AppServer object.
ASP script using VBScript or JScript | Use the ASP built-in object classes listed below.

The ASP built-in objects are organized by the type of information they contain. If you are developing an ASP script, use the object classes listed in the following table:

Class | Purpose
--- | ---
Application Object | The Application object stores information related to the entire Web application including variables and objects that exist for the lifetime of the application.
ASPError Object | The ASPError object stores information about an error condition.
ObjectContext Object | The ObjectContext object is a wrapper for the COM+ ObjectContext object which provides methods used in transaction processing.
Request Object | The Request object stores information related to the HTTP request. This includes forms, cookies, server variables, and certificate data.
Response Object | The Response object stores information related to the server's response. This includes displaying content, manipulating headers, setting locales, and redirecting requests.
ScriptingContext Object | In a component, this object returns references to the built-in objects. This is an obsolete and unsupported approach. It is recommended that you use the COM+ ObjectContext object.
Server Object | The Server object provides methods for various server tasks. With these methods you can execute code, get error conditions, encode text strings, create objects for use by the Web page, and map physical paths.
Session Object | The Session object stores information related to the user's session including variables and objects that exist for the lifetime of the session.

Related Topics

- For information on accessing the ASP built-in objects from applications, see the ASP Built-in Object Reference topic under the Programmer's Guide in the MSDN Online Library.
- For code examples that access the ASP built-in objects using C++ interfaces, Java classes, or GetObjectContext, see the Accessing ASP Built-in Objects from Applications topic under the Programmer's Guide in the MSDN Online Library.

© 1997-2001 Microsoft Corporation. All rights reserved.