473,425 Members | 1,824 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,425 software developers and data experts.

Problem with the message property of event log entries

I am reading events from an event log on a remote server. Certain events
will be put in a file or some other form of output. Everything works fine
but I am concerned a potential problem. Reading about how events are
handled, I found that the message property of an event is not recorded but
rather accessed from the source dll file. While testing my code I found that
when accessing the message property of a remote event log the message is
taken from the local dll file rather than the remote computers dll file.
According to the documentation it is possible for these messages to be
different if the dll files are not the same. This poses potential problems
because the message might be incorrect if it is not getting it from the
remote computer. I tested this by restricting permission to relevant
registry information locally, and sure enough my code throws an access
exception reading the registry.
I am trying to find out if there is some way to get the message from the
remote computer or if I can at least count on some events to be standardized
such as the ones in the security log.
I’m not sure if code will help but this example at least shows some of the
classes being used.

EventLog[] remoteEventLogs = EventLog.GetEventLogs(server);
foreach(EventLog log in remoteEventLogs)
{
foreach (EventLogEntry entry in log)
{
Console.WriteLine(entry.message);
}
}

The registry keys are located at:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Servic es\Eventlog
I disabled access to a specific event source of the application log for my
test (using regedt32 not regedit)
The exception is:
System.Security.SecurityException: Requested registry access is not allowed.
Let me know if more information is needed.

Thanks,
Paul

Nov 17 '05 #1
0 1078

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David Fraser | last post by:
Hi We are trying to debug a problem with services created using py2exe. It seems that these problems have arisen after services were installed and removed a few times. OK, first the actual...
2
by: amol | last post by:
Hi, I have the following code to raise events when something gets written to the Application log. The problem I'm seeing is when a bunch of entries get written to the log at the same time (or...
1
by: Dean | last post by:
I've been using listboxes for a long time with no problems but I have a weird problem on a page that I can't figure out.... I'm filling a listbox, as usual with a dataset but when the user...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
14
by: Altman | last post by:
Ok I have a control that is inherited from another class. In the child I put msgbox(me.name) in the load event. What always pops up is the name of the parent class and not the name of the...
2
by: r norman | last post by:
Please excuse the cross-posting. This question was raised in microsoft.public.dotnet.general but hasn't been answered so I am trying where I can. There are two of us who have the same problem...
6
by: visionstate | last post by:
Hi there, I am building a database that requires cascading lists on a form. I currently have (I may be adding more later) 3 combo boxes on my form - Department, Surname and Forename. The user...
11
by: The Frog | last post by:
Hi all, Maybe I am just missing something simple here, but I seem to have an issue with a callback function in A97 that is used to fill a Listbox with values. The first time the callback...
3
by: Dom | last post by:
I have a prgram with a webBrowser control. The user can click on a Linked Reference and the webBrowser control shows that site. Sometimes the URL (not my program, but the URL I am browsing to)...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.