472,127 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

How to read Security Logs from Domain Controllers using C#?

I am trying to read Account Management category events of Security Logs using EventLog class, but I can not read the event message. Error message:

"The description for Event ID '565' in Source 'Security' cannot be found. The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them."

Any suggestion?

Also is it possible to read event log from Domain Controllers in real time using C# (or .Net)...if yes how?

May 24 '07 #1
3 2276
read the ms article KB842795 and then "Introduction to the EventLog Component" in your .Net documentation
May 25 '07 #2

Can you explain in detail? Article KB 842795 is about custom event and I am not dealing with custom events...........

May 29 '07 #3
Read that introductory material.

using System.Diagnostics;
static class ShowEventLog
static void Main()
NegotiateStream ns = new NegotiateStream(new System.IO.
EventLog el = new EventLog("Application","");
foreach (EventLogEntry ele in el.Entries)
May 29 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.