473,651 Members | 3,036 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

2 New Member
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?


Regards!
May 24 '07 #1
3 2372
oohay251
27 New Member
read the ms article KB842795 and then "Introducti on to the EventLog Component" in your .Net documentation
May 25 '07 #2
dkm234
2 New Member
Hi,


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

Thanks!
May 29 '07 #3
oohay251
27 New Member
Read that introductory material.

using System.Diagnost ics;
static class ShowEventLog
{
static void Main()
{
NegotiateStream ns = new NegotiateStream (new System.IO.
EventLog el = new EventLog("Appli cation","192.16 8.1.101");
foreach (EventLogEntry ele in el.Entries)
{
Console.WriteLi ne(ele.TimeWrit ten);
Console.WriteLi ne(ele.Message) ;
}
}
}
May 29 '07 #4

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

Similar topics

2
2619
by: Joseph Geretz | last post by:
I'm having a credentialing problem in my web application. Actually, I don't think this is an IIS security issue, since I'm able to access the page I'm requesting. However, the executing page itself is not able to access a specific network resource and I just can't figure out why. First of all, let me say this worked fine with IIS running on Win2000 Server. This has not worked since I upgraded to Windows Server 2003. My Platform: Windows...
11
1928
by: Jason | last post by:
I'm trying to implement role-based security in my ASP.NET application, however, everytime I perform an IsInRole check, it ALWAYS returns false! My Web.Config file has the following entry: <authentication mode="Windows" /> Here is sample code that returns false: private void Page_Load(object sender, System.EventArgs e) {
3
2593
by: =?Utf-8?B?Q0QuU21hbGxleQ==?= | last post by:
Is there a command line switch available for the EventViewer which will allow me to specify which directory to view the available logs from? I will have multiple workstations writing to a mirrored set of really large flash drives. The workstations will write to their specific standard .evt files. I need to be able to start EventViewer and specify which workstations's logs to go view at startup. Is this possible w/o creating my own...
0
1083
by: =?Utf-8?B?U2FtZWVrc2hh?= | last post by:
Not sure which newsgroup this question should go to. I want to find out, using .net c# code whether a domain controller on the given machine is read only. The logic I am using is as follows - 1. Use System.Management namespace - ManagementObject and ObjectSearcher classes 2. First find out domain name for the given machine using Win32_ComputerSystem class - DomainName property 3. Use the domain name obtained in step 2 to query...
0
8278
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8701
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8466
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7299
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1912
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.