Logging Exception to Event Log with ASP

How to log exceptions with ASP.

<%@ Language=VBScript %>
<% 'Use these Constants to designate the type of Event Log.
const SUCCESS = 0
const ERROR = 1
const WARNING = 2
const INFORMATION = 4
const AUDIT_SUCCESS = 8
const AUDIT_FAILURE = 16
dim WshShell set WshShell = Server.CreateObject("WScript.Shell")
wshshell.Logevent WARNING, " Event Logged Successfully by Windows Script Host!"
set wshshell=nothing

Save this file as Test.asp in C:\Inetpub\wwwrrot and run thru browser by typing
http://localhost/test.asp


Reference: http://matespoint.blogspot.com/2008/05/how-to-log-events-from-asp.html


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: