[This is preliminary documentation and subject to change]
The IIS Log component is used to create an IISLog object, which enables your applications to read from the IIS log. This component allows you to quickly create, for example, ASP scripts or VB components that programmatically walk through daily log files so that certain types of information can be extracted.
Important
The user accessing the ASP script that
instantiates the IISLog component must be authenticated as
an Administrator or Operator on the server on which IIS is running.
If the user is only Anonymous, the IIS Log component will not
function properly.
| Logscrpt.dll | The Logging Utility component |
SetoIISLog= Server.CreateObject( MSWC.IISLog )
| AtEndOflog | Indicates whether all records have been read from the log file. |
| CloseLogFiles | Closes all open log files. |
| OpenLogFile | Opens a log file for reading or writing. |
| ReadFilter | Filters records from the log file by date and time. |
| ReadLogRecord | Reads the next available log record from the current log file. |
| WriteLogRecord | Writes a log record to the current log file. |
| BytesReceived | Indicates the bytes received. |
| BytesSent | Indicates the bytes sent. |
| ClientIP | Indicates the client's host name. |
| Cookie | Indicates the client's cookie. |
| CustomFields | Indicates an array of custom headers |
| DateTime | Indicates the date and time in GMT. |
| Method | Indicates the operation type. |
| ProtocolStatus | Indicates the protocol status. |
| ProtocolVersion | Indicates the version string. |
| Referer | Indicates the referrer page. |
| ServerIP | Indicates the server's IP address. |
| ServerName | Indicates the server name. |
| ServerPort | Indicates the port number. |
| ServiceName | Indicates the service name. |
| TimeTaken | Indicates the total processing time. |
| URIQuery | Indicates any parameters passed with the request. |
| URIStem | Indicates the target URL. |
| UserAgent | Indicates the user agent string. |
| UserName | Indicates the user's name. |
| Win32Status | Indicates the Win32 status code. |
Note
The following steps are necessary to use the IIS
Log component effectively:
Important
Only log files created by logging modules that
support log file reading will be accessible through this component.
The four built-in logging modules that come with IIS support
log-file reading, but if you are using a custom or third-party
logging module, you will need to enhance the logging module.