views:

476

answers:

1

I am working on creating a web app that will query event logs on internal servers for events using a specific ID. Since most of the servers are running Windows Server 2003, I cannot use the preferred System.Diagnostics.Eventing.Reader method that I was hoping to use.

I've seen the mention of using WMI, but would like to avoid this if possible. I have dabbled with the System.Diagnostics class but cannot seem to get it working when running on a server. It is able, when testing locally, to query my event log, but displays nothing when put on the final server. There is no error that is displayed after the program is ran.

What is the best way to accomplish this using VB.NET and ASP.NET? If WMI is the best method, could someone please point me in the right direction, as I have never worked with it before.

Thanks in advance.

A: 

I believe that querying the event log of remote servers is best approached with WMI. It's best to use a tool designed for the task you want to accomplish.

It looks complex on the surface, but it's really not that bad.

Here's a link to get you started.

http://bloggingabout.net/blogs/wellink/archive/2005/04/08/3289.aspx

David Stratton