Example
<% ' The following code uses the CreateObject method of the ' Server object to instantiate a Logging Utility object on ' the server. Dim objLogUtil Set objLogUtil = _ Server.CreateObject("MSWC.IISLog") %>
For more details on the use of the CreateObject method see its documentation in Chapter 9.
For several of the methods of the Logging Utility component, you can
use constants instead of the long or integer values (for example, the
ForReading constant for the OpenLogFile method). To enable the use of
these constants, you must set a reference to the Logging Utility
component's type library by adding the following code to
global.asa or within the
<HEAD>
tag of your script:
<!-- METADATA TYPE="typelib" FILE="c:\WINNT\system32\inetsrv\logscrpt.dll" -->
Note that the METADATA code from an individual ASP page does not show up in the response sent to the client.
Get ASP in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.