Error logging for mutliple sites on same server

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.
 
O

Onwuka Emeka

You might want to look at open source logging tools like log4net
logging.apache.org/log4net/
 
F

Flinky Wisty Pomm

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top