Error logging for mutliple sites on same server

  • Thread starter Thread starter philwilks
  • Start date Start date
P

philwilks

I have a dedicated server on which I run several ASP.Net 2.0 website.
At the moment, each site has an Application_OnError subroutine that is
defined in the site's Global.asax file. This writes the error to a log
file, as well as emailing me with an alert.

Is there a better way to do this? Ideally, I'd just have one thing set
up that would pick up errors from any of my websites. I was thinking
that there might be a way to use the Windows Event Viewer and set up
some sort of custom script to email errors caused by ASP.Net.
 
You might want to look at open source logging tools like log4net
logging.apache.org/log4net/
 
You can subscribe to a windows event log. There's some code here for a
simple event log watcher as a WinForms app
[http://www.codeproject.com/csharp/RTEventReader.asp]

What I'd probably do is write a Windows service that watched your local
system's event log and published events to a log file/email
notification list. That way you can set it up once and it should pick
up any unhandled exceptions from the windows event log.

hth

-- flink
 
Back
Top