Solved

Raise a "clean" event

Posted on 2011-03-08
4
376 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

789 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