CodeKicks.com
Focus on Microsoft Technologies - Tutorials, Articles, Code Samples.

Tuesday, October 03, 2006

Detecting ASP Website Errors Using Microsoft Log Parser

I am always interested in the number and type of ASP errors happening on my websites.  These cause 500 HTTP status codes to be returned to the client web browser.  Depending on how a website is configured, a website may display an error message (in the case of coding errors), a blank screen (if scripts timeout) or something else altogether.  Such errors can be confusing for website users and could significantly reduce the number of transactions completed by users (i.e. leading to loss of sales in the case of ecommerce sites).

Fortunately, IIS usefully logs ASP errors to the IIS web server log file.  They are appended to the querystring field and appear like this:

|-|ASP_0113|Script_timed_out

Searching a log file for "|ASP_" is a good way of finding them.  However, if your log files are very large or you have a lot of them then it is much easier to use a tool to find them.  Although there are a multitude of applications and services available for analyzing web statistics and web server logs, I am a great fan of Microsoft's Log Parser utility.  It allows any type of log file to be queried using standard SQL and the reports to be generated in a number of formats.  It may be downloaded from the Microsoft website or from http://www.logparser.com/.

Detecting ASP Website Errors Using Microsoft Log Parser

Post a Comment