Re: Is there a way to query Security Event Log with Filter in C#?
- From: "Jani Järvinen [MVP]" <janij@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 2 Jan 2007 15:52:39 +0200
Hi Pucca,
I currently prcoess each Security Log
entry one by one to extract those that fit the selection criteria. Is
there
a function that I can use to query the entries with option of filtering
for
certain event id and/or time period in C#?
I'm afraid no such function/feature exists in .NET 2.0, but it shouldn't be
too difficult to write your own filtering when you loop through the entries
in the log using the Entries property. Here's a basic "how to" article on
different things you can do with event logs:
http://support.microsoft.com/kb/815314
Also, you might wish to enable notifications when new entries are written to
the event log, and then filter the events there (if applicable to your
solution). See the Receive Event Notifications section in the above article.
Thanks!
--
Regards,
Mr. Jani Järvinen
C# MVP
Helsinki, Finland
janij@xxxxxxxxxxxxxxxxxxxxxx
http://www.saunalahti.fi/janij/
.
- Prev by Date: Re: Web Interface for a c# Console Application
- Next by Date: Re: Printing Word documents with C#
- Previous by thread: Grid View - Errors and Not Saving Last Row.....
- Next by thread: Re: Is there a way to query Security Event Log with Filter in C#?
- Index(es):
Relevant Pages
|