Sideway
output.to from Sideway
Draft for Information Only

Content

 ASP Server Components
  Logging Utility Component
    File Name
    Syntax
    Parameters
    Remark
   IISLog.AtEndOfLog Method
    Syntax Syntax
    Parameters
    Return Values
   IISLog.CloseLogFiles Method
    Syntax Syntax
    Parameters
   IISLog.OpenLogFile Method
    Syntax Syntax
    Parameters
   IISLog.ReadFilter Method
    Syntax Syntax
    Parameters
   IISLog.ReadLogRecord Method
    Syntax
    Parameters
   IISLog.WriteLogRecord Method
    Syntax
    Parameters
    
   IISLog.BytesReceived Property
    Syntax
    Parameters
    Return Values
   IISLog.BytesSent Property
    Syntax
    Parameters
    Return Values
   IISLog.ClientIP Property
    Syntax
    Parameters
    Return Values
   IISLog.Cookie Property
    Syntax
    Parameters
    Return Values
   IISLog.CustomFields Property
    Syntax
    Parameters
    Return Values
   IISLog.DateTime Property
    Syntax
    Parameters
    Return Values
   IISLog.Method Property
    Syntax
    Parameters
    Return Values
   IISLog.ProtocolStatus Property
    Syntax
    Parameters
    Return Values
   IISLog.ProtocolVersion Property
    Syntax
    Parameters
    Return Values
   IISLog.Referer Property
    Syntax
    Parameters
    Return Values
   IISLog.ServerIP Property
    Syntax
    Parameters
    Return Values
   IISLog.ServerName Property
    Syntax
    Parameters
    Return Values
   IISLog.ServerPort Property
    Syntax
    Parameters
    Return Values
   IISLog.ServiceName Property
    Syntax
    Parameters
    Return Values
   IISLog.TimeTaken Property
    Syntax
    Parameters
    Return Values
   IISLog.URIQuery Property
    Syntax
    Parameters
    Return Values
   IISLog.URIStem Property
    Syntax
    Parameters
    Return Values
   IISLog.UserAgent Property
    Syntax
    Parameters
    Return Values
   IISLog.UserName Property
    Syntax
    Parameters
    Return Values
   IISLog.Win32Status Property
    Syntax
    Parameters
    Return Values

 ASP Server Components

Some of the ASP server components are the common features found in dynamic web pages. These base ASP server components are provided to enrich the pre-made functions of ASP technology for making dynamic and interactive web pages. However, some IIS pre-made components are not installed for all version of IIS. Ad Rotator, Browser Capabilities, Content Linker, Content Rotator, Counters, Logging Utility, My Info, Page Counter, Status, and tools are not installed with IIS 6.0. However, if you upgrade your Web server from a previous version of IIS, the pre-made components are not removed. Some IIS pre-made components, ASP content rotator and nextlink,  are deprecated in IIS7. And most IIS pre-made components are either not installed with IIS7 or their usage is not supported.

Logging Utility Component

The Logging Utility Component can be used to create an IISLog object that acts as a HTML tags holder on an ASP page for reading entries from the IIS log on a web page. The IISLog object provide the needed tools to open, close, check end of record and add read filter of an IISLog for reading and writing a log record to the IIS log. Besides, a specific information can also be retrieved by specifying the corresponding properties of the IISLog object accordingly. In other words, the IISLog,OpenLogFile method should be used to specify from which the IIS log file to be retrieved. Then, the appropriate log records can be read by the IISLog, the IISLog,ReadLogRecord method. And the properties of the IISLog object can be used to retrieve the required information from the log records.

Therefore an IISLog object can be used in an ASP page to extract information from the IISLog file. However, only an Administrator or Operator on the server on which the IIS is running is authenticated to instantiate the Logging Utility component when accessing the ASP script. If the user is only Anonymous, the Logging Utility component will not function properly.

The built-in Logging Utility Component can only support the four built-in logging modules that come with IIS web server. Therefore only log files created by the four built-in logging modules can be accessed through the IISLog,ReadLogRecord method of the built-in Logging Utility Component. If the log file is created by custom or third-party logging module, the built-in Logging Utility Component should be enhanced before the IISLog,ReadLogRecord method can read the record in the log file created by the custom or third-party logging module. 

File Name

The file name of the Content Rotator component is Logscrpt.dll.

Syntax

Set IISLogName = Server.CreateObject( "MSWC.IISLog" )

Parameters

IISLogName

The parameter "IISLogName" is the name assigned to the instance of the IISLog object created by the call using the Server.CreateObject.

Remark

The Content Rotator component does not work with Internet Information Server 7 (IIS7).

IISLog.AtEndOfLog Method

IISLog.AtEndOfLog method is used to check whether there are any more reacords available in the IIS log file by attempting to read a log record from the IIS log file specified by the IISLog.OpenLogFile method. The IISLog.AtEndOfLog method returns TRUE when an attempt to read past the end of the  IIS log file.

Syntax Syntax

IISLogName.AtEndOfLog()

Parameters

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return Values by this method contains an boolean data.  IISLog.AtEndOfLog method returns "TRUE" only if there is no more record can be read from the IIS log file. Otherwise, IISLog.AtEndOfLog method will return "FALSE"

IISLog.CloseLogFiles Method

IISLog.CloseLogFiles method is used to close all opened IIS log files which are opened by the IISLog object using the IISLog.OpenLogFile method according to the specified IOMode parameter.

Syntax Syntax

IISLogName.CloseLogFiles(IOMode)

Parameters

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

IOMode

The parameter "IOMode" is a "Long" type value used to specify which types of log file or files to be closed by the IISLog.CloseLogFiles method. The possible values are:

Value=1: Constant name "ForReading" is used to indicate that all log files that have been opened for reading by IISLog object should be closed
Value=2: Constant name "ForWriting" is used to indicate that all log files that have been opened for writing by IISLog object should be closed
Value=32: Constant name "AllOpenFiles" is used to indicate that all log files that have been opened by IISLog object should be closed

IISLog.OpenLogFile Method

IISLog.OpenLogFile method is used to open the specified log file for reading or writing by IISLog object. In order to return the correct log file for log file manipulation by the IISLog object, none of the parameters of the IISLog.OpenLogFile method are optional

Syntax Syntax

IISLogName.OpenLogFile(
        FileName,IOMode,ServiceName,ServiceInstance,OutputLogFileFormat)

Parameters

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

FileName

The parameter "FileName" is the name of the log file to be opened by the IISLog.OpenLogFile method.

IOMode

The parameter "IOMode" is used to specify whether the log file to be opened by the IISLog.OpenLogFile method is opened for reading or writing. The possible values are:

Value=1: Constant name "ForReading" is used to indicate that the log file  to be opened by the IISLog.OpenLogFile method is opened for reading by IISLog object only
Value=2: Constant name "ForWriting" is used to indicate that all log files to be opened by the IISLog.OpenLogFile method is opened  for writing by IISLog object only

ServiceName

The parameter "ServiceName" is used to specify the service name of the logging module which is used to create the log file that is used for log file manipulation by the IISLog object. Only the matched log file created by the specified logging module will return records by the IISLog object.

ServiceInstanceviceInstance

The parameter "ServiceInstance" is used to specify the specific instance of the named service of the logging module which is used to create the log file that is used for log file manipulation by the IISLog object. Only the matched log file created by the specified named service of the logging module will return records by the IISLog object.

OutputLogFileFormat

The parameter "OutputLogFileFormat" is used to specify the format of the matched log file that is used for log file manipulation by the IISLog object.

IISLog.ReadFilter Method

IISLog.ReadFilter method is used to specify the constraint in terms of a date and time range filter for reading log records from the log file for log file manipulation by the IISLog object. Although bothe the "startDateTime" and "endDateTime" are optional parameters, at least one parameter should be specified.

Syntax Syntax

IISLogName.ReadFilter([startDateTime],[endDateTime])

Parameters

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

startDateTime

The optional parameter "startDateTime" is used to specify the date and time after which log records are to be read.

endDateTime

The optional parameter "endDateTime" is used to specify the date and time before which log records are to be read.

IISLog.ReadLogRecord Method

IISLog.ReadLogRecord method is used to read the next available log record from the log file for log file manipulation by the IISLog object.

Syntax

IISLogName.ReadLogRecord()

Parameters

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

IISLog.WriteLogRecord Method

IISLog.WriteLogRecord method is used to write the new log record read from another the log file using another IISLog object to the opened log file by the IISLog object.

Syntax

IISLogName.WriteLogRecord(IISLogReadName)

Parameters

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to which the log record is written.

IISLogReadName

The parameter "IISLogReadName" is the name of the instance of the IISLog object from which the log record is read.

 

IISLog.BytesReceived Property

IISLog.BytesReceived property is used to retrieve the number of bytes received during the operation from the current log record read by the IISLog object.

Syntax

count=IISLogName.BytesReceived

Parameters

count

The parameter "count" is the number of bytes received field from the current log record assigned to.

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.BytesSent Property

IISLog.BytesSent property is used to retrieve the number of bytes sent during the operation from the current log record read by the IISLog object.

Syntax

count=IISLogName.BytesSent

Parameters

count

The parameter "count" is the number of bytes sent field from the current log record assigned to.

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.ClientIP Property

IISLog.ClientIP property is used to retrieve the client's IP address for the operation from the current log record read by the IISLog object.

Syntax

var=IISLogName.ClientIP

Parameters

var

The parameter "var" is the client's IP address field from the current log record  assigned to.

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.Cookie Property

IISLog.Cookie property is used to retrieve the client's cookie for the operation from the current log record read by the IISLog object.

Syntax

var=IISLogName.Cookie

Parameters

var

The parameter "var" is the cookie field from the current log record  assigned to.

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.CustomFields Property

IISLog.CustomFields property is used to extract the customfields for the operation from the current log record read by the IISLog object. The IISLog.CustomFields property enable the IISLog object to retrieve any custom or special fields, such as extra custom HTTP headers included in the HTTP operation that were logged by IIS

Syntax

var=IISLogName.CustomFields

Parameters

var

The parameter "var" is a two-dimensional array of variants to which each pair of variants in form of a paired key-value to describle an HTTP header in the CustomFields field extracted from the current log record  assigned.

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.DateTime Property

IISLog.DateTime property is used to retrieve the date and time in GMT of the operation from the current log record read by the IISLog object.

Syntax

var=IISLogName.DateTime

Parameters

var

The parameter "var" is the data and time field from the current log record assigned to

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.Method Property

IISLog.Method property is used to extract the HTTP operation type from the current log record read by the IISLog object.

Syntax

var=IISLogName.Method

Parameters

var

The parameter "var" is the HTTP operation type such as GET or PUT extracted of the Method field from the current log record assigned to

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.ProtocolStatus Property

IISLog.ProtocolStatus property is used to retrieve the HTTP protocol status code for the HTTP operation referred to from the current log record read by the IISLog object.

Syntax

var=IISLogName.ProtocolStatus

Parameters

var

The parameter "var" is the ProtocolStatus field from the current log record assigned to

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.ProtocolVersion Property

IISLog.ProtocolVersion property is used to retrieve the ProtocolVersion string from the current log record read by the IISLog object.

Syntax

var=IISLogName.ProtocolVersion

Parameters

var

The parameter "var" is the ProtocolVersion field from the current log record assigned to

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.Referer Property

IISLog.Referer property is used to retrieve the referer URL from the current log record read by the IISLog object.

Syntax

var=IISLogName.Referer

Parameters

var

The parameter "var" is the Referer field from the current log record assigned to

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.ServerIP Property

IISLog.ServerIP property is used to retrieve the server's IP address for the operation referred to from the current log record read by the IISLog object.

Syntax

var=IISLogName.ServerIP

Parameters

var

The parameter "var" is the IP address of the server in the ServerIP field from the current log record assigned to

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.ServerName Property

IISLog.ServerName property is used to retrieve the  name of the computer for the operation referred to from the current log record read by the IISLog object.

Syntax

var=IISLogName.ServerName

Parameters

var

The parameter "var" is the name of the computer in the ServerName field from the current log record assigned to

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.ServerPort Property

IISLog.ServerPort property is used to retrieve the port number used for the operation referred to from the current log record read by the IISLog object.

Syntax

var=IISLogName.ServerPort

Parameters

var

The parameter "var" is the port number used for the operation in the ServerPort field from the current log record assigned to

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.ServiceName Property

IISLog.ServiceName property is used to retrieve the name of service including the server instance from the current log record read by the IISLog object.

Syntax

var=IISLogName.ServiceName

Parameters

var

The parameter "var" is the ServiceName field from the current log record assigned to

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.TimeTaken Property

IISLog.TimeTaken property is used to retrieve the total processing time required for the operation referred to from the current log record read by the IISLog object.

Syntax

var=IISLogName.TimeTaken

Parameters

var

The parameter "var" is the TimeTaken field from the current log record assigned to

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.URIQuery Property

IISLog.URIQuery property is used to retrieve any HTTP request parameters or query string that was passed for the operation referred to from the current log record read by the IISLog object.

Syntax

var=IISLogName.URIQuery

Parameters

var

The parameter "var" is the URIQuery field from the current log record assigned to

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.URIStem Property

IISLog.URIStem property is used to retrieve the target URL for the operation referred to from the current log record read by the IISLog object.

Syntax

var=IISLogName.URIStem

Parameters

var

The parameter "var" is the URIStem field from the current log record assigned to

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.UserAgent Property

IISLog.UserAgent property is used to retrieve the browser user agent string for the operation referred to from the current log record read by the IISLog object.

Syntax

var=IISLogName.UserAgent

Parameters

var

The parameter "var" is the UserAgent field from the current log record assigned to

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.UserName Property

IISLog.UserName property is used to retrieve the user name of non-anonymous client for the operation referred to from the current log record read by the IISLog object.

Syntax

var=IISLogName.UserName

Parameters

var

The parameter "var" is the UserName field from the current log record assigned to

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.

IISLog.Win32Status Property

IISLog.Win32Status property is used to retrieve the Win32 status code for the operation referred to from the current log record read by the IISLog object.

Syntax

var=IISLogName.Win32Status

Parameters

var

The parameter "var" is the Win32Status field from the current log record assigned to

IISLogName

The parameter "IISLogName" is the name of the instance of the IISLog object to be set.

Return Values

Return values only available when the property is configured to log the specified property on the  Web server in the log files.


©sideway

ID: 130200009 Last Updated: 2/21/2013 Revision: 0 Ref:

close

References

  1. Active Server Pages,  , http://msdn.microsoft.com/en-us/library/aa286483.aspx
  2. ASP Overview,  , http://msdn.microsoft.com/en-us/library/ms524929%28v=vs.90%29.aspx
  3. ASP Best Practices,  , http://technet.microsoft.com/en-us/library/cc939157.aspx
  4. ASP Built-in Objects,  , http://msdn.microsoft.com/en-us/library/ie/ms524716(v=vs.90).aspx
  5. Response Object,  , http://msdn.microsoft.com/en-us/library/ms525405(v=vs.90).aspx
  6. Request Object,  , http://msdn.microsoft.com/en-us/library/ms524948(v=vs.90).aspx
  7. Server Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525541(v=vs.90).aspx
  8. Application Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525360(v=vs.90).aspx
  9. Session Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms524319(8v=vs.90).aspx
  10. ASPError Object,  , http://msdn.microsoft.com/en-us/library/ms524942(v=vs.90).aspx
  11. ObjectContext Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525667(v=vs.90).aspx
  12. Debugging Global.asa Files,  , http://msdn.microsoft.com/en-us/library/aa291249(v=vs.71).aspx
  13. How to: Debug Global.asa files,  , http://msdn.microsoft.com/en-us/library/ms241868(v=vs.80).aspx
  14. Calling COM Components from ASP Pages,  , http://msdn.microsoft.com/en-us/library/ms524620(v=VS.90).aspx
  15. IIS ASP Scripting Reference,  , http://msdn.microsoft.com/en-us/library/ms524664(v=vs.90).aspx
  16. ASP Keywords,  , http://msdn.microsoft.com/en-us/library/ms524672(v=vs.90).aspx
  17. Creating Simple ASP Pages,  , http://msdn.microsoft.com/en-us/library/ms524741(v=vs.90).aspx
  18. Including Files in ASP Applications,  , http://msdn.microsoft.com/en-us/library/ms524876(v=vs.90).aspx
  19. ASP Overview,  , http://msdn.microsoft.com/en-us/library/ms524929(v=vs.90).aspx
  20. FileSystemObject Object,  , http://msdn.microsoft.com/en-us/library/z9ty6h50(v=vs.84).aspx
  21. http://msdn.microsoft.com/en-us/library/windows/desktop/ms675944(v=vs.85).aspx,  , ADO Object Model
  22. ADO Fundamentals,  , http://msdn.microsoft.com/en-us/library/windows/desktop/ms680928(v=vs.85).aspx
close

Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Reference 79

Computer

Hardware 224

Software

Application 213

Digitization 32

Latex 52

Manim 204

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 429

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 33

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2022 Sideway . All rights reserved Disclaimers last modified on 06 September 2019