ASP
  Home arrow ASP arrow Page 2 - View Your Web Servers Log Files With ASP
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP

View Your Web Servers Log Files With ASP
By:
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 18
    2001-12-28

    Table of Contents:
  • View Your Web Servers Log Files With ASP
  • Windows 2000 and log files
  • The MSWC logging utility
  • The ShowLogEntries sub-routine
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    View Your Web Servers Log Files With ASP - Windows 2000 and log files


    (Page 2 of 5 )

    Whenever an error occurs either directly or in-directly through IIS, or whenever a file is retrieved from the web server, the details of that activity are stored in a log file. All IIS log files are stored in the c:\winnt\system32\w3svc1 directory. A new log file is created for each new day, and the names of these log files are sequential: ex010828.log, ex010829.log, etc. To get a better understanding of what an IIS web server log file looks like, fire up notepad and open any of the files in your web servers “c:\winnt\system32\w3svc1” directory. It should resemble the one shown below:

    One of the log files on the devArticles.com development server

    This is one of the log files sitting on the development server for devArticles.com. Our site is developed and tested using IIS and PHP on a Windows 200 server, and then deployed to our production server. Our production server runs Apache, PHP and MySQL on several Linux servers.

    If you take a look at the log file, then you will notice it contains several rows of values. Each value is separated by a space and contains the details of that individual log entry. A log entry from the file shown above looks like this:

    2001-08-25 00:21:34 127.0.0.1 - 127.0.0.1 80 POST /devarticles/devadmin/index.php - 200 Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+NT+5.0;+COM++1.0.2204)

    At the top of each Windows 2000 log file, there is a commented line (comments in a log file begin with “#”), which describes each of the fields in a log entry:

    #Fields: date time c-ip cs-username s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status cs(User-Agent)

    So, in the sample log entry above, the first “field” is the date. The second is the time, third is the clients IP address, etc. Log files can contain just a couple of entries, or can contain thousands… it all depends on how much activity went on during any particular day for that server.

    Now that we understand a bit more about how and where Windows 2000 server stores its IIS web logs, let’s look at how we can gain access to them through as ASP Script.

    More ASP Articles
    More By


     

    ASP ARTICLES

    - Central Scoreboard with Flash and ASP
    - Calorie Counter Using WAP and ASP
    - Creating PGP-Encrypted E-Mails Using ASP
    - Be My Guest in ASP
    - Session Replacement in ASP
    - Securing ASP Data Access Credentials Using t...
    - The Not So Ordinary Address Book
    - Adding and Displaying Data Easily via ASP an...
    - Sending Email From a Form in ASP
    - Adding Member Services in ASP
    - Removing Unconfirmed Members
    - Trapping HTTP 500.100 - Internal Server Error
    - So Many Rows, So Little Time! - Case Study
    - XDO: An XML Engine Class for Classic ASP
    - Credit Card Fraud Prevention Using ASP and C...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
    Stay green...Green IT