[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 applicationUse the C++ interfaces for the ASP built-in objects.
C++ COM componentUse the C++ interfaces for the ASP built-in objects.
Java applicationUse the Java classes for the ASP built-in objects.
Visual Basic(VB) componentUse 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 JScriptUse 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 ObjectThe Application object stores information related to the entire Web application including variables and objects that exist for the lifetime of the application.
ASPError ObjectThe ASPError object stores information about an error condition.
ObjectContext ObjectThe ObjectContext object is a wrapper for the COM+ ObjectContext object which provides methods used in transaction processing.
Request ObjectThe Request object stores information related to the HTTP request. This includes forms, cookies, server variables, and certificate data.
Response ObjectThe Response object stores information related to the server's response. This includes displaying content, manipulating headers, setting locales, and redirecting requests.
ScriptingContext ObjectIn 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 ObjectThe 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 ObjectThe Session object stores information related to the user's session including variables and objects that exist for the lifetime of the session.

Related Topics


© 1997-2001 Microsoft Corporation. All rights reserved.