Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Raise a "clean" event

Posted on 2011-03-08
4
Medium Priority
?
383 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

721 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