473,322 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How to read the message of the event log using System.Management classes?

I am able to query/read the "Application" event log using System.Management classes in VB.net 2005 (win xp)
But I have problem reading the "Message" / "description" of my custom event log.
I am getting a System.NullReferenceException{"Object reference not set to an instance of an object."}
while reading the "Message" / "Description of the event log while it is reading the others properties.

Also when I use System.Diagnostics.EventLog and read all the Events on by one I am able to read
the message/description of my custom event log.

Why is that the System.Management classes can't read the my custom event log messages while the
System.Diagnostics.EventLog classes can read them.

The reason I want to use System.Management classes is bcoz I can query my custom event log
where as with System.Diagnostics.EventLog classes I have to read the whole event log.

Note:
My custom event log message is really big enough.
Jan 26 '11 #1
0 1325

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

Similar topics

0
by: Dennis | last post by:
Can I enable or disable the network adapter using system.management classes? Thanks, Dennis
2
by: Paul Gronka | last post by:
I've got a VB.NET windows application (written in VS .NET 2003) that makes a call to WMI for retrieving the MAC Address from the client's PC. It works on 4 out of the 5 PC's tested so far. All...
5
by: Andrew Chen | last post by:
Hi: I've been unable to compile the namespace System.Management, which returns an error decribing the reference does not exist. Can anyone tell what happened there? My thinking is that I need...
0
by: Masood Siddiqi [MSFT] | last post by:
Hi, I am getting this exception Unhandled Exception: System.Management.ManagementException: COM object that has been separated from its underlying RCW can not be used. --->...
9
by: Ben Dewey | last post by:
Project: ---------------------------- I am creating a HTTPS File Transfer App using ASP.NET and C#. I am utilizing ActiveDirectory and windows security to manage the permissions. Why reinvent...
3
by: Yoshitha | last post by:
Hi to get the cpu id i'm using the system.management class. is it possible to get the cpuid with out using system.management ? if poosible can anybody tell me how to get. thanx in advance...
12
by: not_a_commie | last post by:
Is using System.Management in general a faux pas? It seems, after some web searching, that there is a fair amount of resistance to it because of speed and portability. I need to know how many...
1
by: Boki | last post by:
Hi All, When I add: using System.Management; it can't pass complier, anything wrong? Is it because C# express limitation ? Thanks!
2
by: karthi84 | last post by:
Hi Experts, i have created a web application which has an option to edit the web config file from the web page. when i create an installer for this project using web setup project in VS2008 and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.