Solved

Raise a "clean" event

Posted on 2011-03-08
4
369 Views
Last Modified: 2013-12-14

(I'm a newbee on c#)

Hello,

A have mom installed and for debug process I wrote a small oo application to raise an alert on operating system. Attached the exe (framework 2.0)

The implementation is :

EventLog myEvent = new EventLog(sLog, System.Environment.MachineName, sSource);
myEvent.WriteEntry(sEvent, EventLogEntryType.Information, iErrNr);

The conclusions are :

- If I create a new source and raise event on that source than is clean.
- If I raise at existing source, the event has "trash" on description, not sure but in principle it is by design, its a microsoft protection to protect someone to raise a alert as if was a specific application.

Is there any way to raise an alert for an existing source without that "trash"?

RaiseEvent.exe
0
Comment
Question by:migav
  • 2
  • 2
4 Comments
 
LVL 41

Expert Comment

by:graye
ID: 35184886
What kind of "trash" are you talking about (no, I did not download your exe file)
0
 

Author Comment

by:migav
ID: 35188620

I raised the event 27 in source Oulook with text "Hello world"

I got  :

The description for Event ID ( 27 ) in Source ( Outlook ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Hello world !.

0
 
LVL 41

Accepted Solution

by:
graye earned 500 total points
ID: 35190129
That's not trash.... that's perfectly normal.

Take a look at the following article... it explains that if the event source does not contain a registry entry for the decriptions, then you'd get the message as you've decribed.

http://www.eventlogblog.com/blog/2008/04/event-log-message-files-the-de.html

Quite frankly, if it were me, I'd ignore this and move on...
0
 

Author Closing Comment

by:migav
ID: 35192764
tnk!
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now