473,734 Members | 2,806 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

2 New Member
I am able to query/read the "Applicatio n" event log using System.Manageme nt classes in VB.net 2005 (win xp)
But I have problem reading the "Message" / "descriptio n" of my custom event log.
I am getting a System.NullRefe renceException{ "Object reference not set to an instance of an object."}
while reading the "Message" / "Descriptio n of the event log while it is reading the others properties.

Also when I use System.Diagnost ics.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.Manageme nt classes can't read the my custom event log messages while the
System.Diagnost ics.EventLog classes can read them.

The reason I want to use System.Manageme nt classes is bcoz I can query my custom event log
where as with System.Diagnost ics.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 1348

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

Similar topics

0
1488
by: Dennis | last post by:
Can I enable or disable the network adapter using system.management classes? Thanks, Dennis
2
14045
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 the workstations are DELLs running XP SP1a with the 1.1 .NET Framework. The following line of code generates an exception on the one PC: Dim oMac As New System.Management.ManagementClass("Win32_NetworkAdapterConfiguration") The error it...
5
16935
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 to upgrade .NET framework to version 1.1!?!
0
1221
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. ---> System.Runtime.InteropServices.InvalidC omObjectException: COM object that has been separated from its underlying RCW can not be used. at System.Management.IEnumWbemClassObject.Clone_(IEnumWbemClassObject&
9
10900
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 the wheel, right? Everything so far is working well with the Active Directory. The problem I am having is with adding File Permissions to a directory. I am currently using some code courtesy of "Willy Denoyette "
3
1285
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 Yoshitha
12
2401
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 CPU sockets there are. I'm using System.Management to do this. It takes about two seconds to do this. (Which, yes, is full-on crap for speed.) But what is the better way to determine the number of CPU sockets in Windows version >= 5 with a .NET >=...
1
1733
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
4655
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 install it, the codes are copied to the virtual directory under Inetpub. when i try to edit the web.config file it throws an exception access is denied to web.config file. but the same project works fine if i copy the file to some other location and...
0
8776
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
9449
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9310
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
9236
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
8186
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
6735
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
4550
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...
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
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.