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

EventLog.WriteEntry problem with existing message file

I have a set of C++ applications that all use a common message DLL. I am
working on a .NET Service that I would also like to use this same message
DLL.

From what I have read, this should work properly:

System.Diagnostics.EventLog.WriteEntry("MySource", "My Message",
EventLogEntryType.Information, 100, 9);

where I want the severity to be Information, the message Event ID in my
custom message DLL to be 100, and the category (also from my custom message
DLL) to be 9.

However, it doesn't work properly -- it doesn't seem to be able to look up
the message text by the Event ID. The event that shows up in the event log
looks right in the event list -- it is an Information message, from source
"MySource" (it's even in the custom Event Log used by this event source --
we're not using Application for these apps). The Category is the correct
name for category #9 in my custom message file, and the event number shows
up in the list as 100. All's well so far.

But when I bring up the event itself to get the message, I get:

The description for Event ID ( 100 ) in Source ( MySource ) 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: My
Message.

This is exactly what would happen in the C++ apps if the Event ID specified
wasn't in the message file. Except in this case, that Event ID is
absolutely in the message file, I can use that event in any of my C++ apps
without problem -- so the message file in this case is not the problem.

Any ideas on why it can find everything ELSE from my message file, but not
the message itself? It finds the category, it finds the source in the
correct custom Event Log, it just can't find the message.

Thanks,
Steve
Nov 16 '05 #1
0 1849

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

Similar topics

4
by: John Lee | last post by:
Hi, Why EventLog.WriteEntry() works fine with Windows ME (where is the message being written or just ignored?) and throw exception on Windows98 and 98SE. Should it be handled at Framework level?...
5
by: David Conorozzo | last post by:
I am able to create new sources using CreateEventSource. I can call GetEventLogs, I can delete sources, I can see if sources exist BUT, as soon as I try a "WriteEntry", I get an exception: ...
0
by: Karthik Srinivasan | last post by:
Hi, My web application which runs on Windows 2003 server writes to EventLog during application startup but I get the following exception Requested registry access is not allowed. at...
1
by: martin | last post by:
Hi, I'm having some problems with the System.Diagnostics.EventLog class in .NET 2.0 I need to recreate an event message source inside a new log but the messages keeps ending up in the old...
7
by: Rob R. Ainscough | last post by:
I'm having difficulty writing anything to the web servers event log from my web app located on that server. Putting this in my web apps web.config did NOT help - immediate causes and error in my...
0
by: rene | last post by:
I'm trying to use costome categories in my eventlog for a program I'm writing. But I have some problems with it, I cant get it to work. Checklist for how I did this. 1. Created a...
0
by: jammendolia | last post by:
Hello all, I am having an intermittent exception occur when writing the the eventlog from a windows service application written in c#, running on a Win2k SP4 server. Here's the code: ...
2
by: Dennis | last post by:
I have a service with the following startup code... When I start the service I see a new entry under... Computer Management(local) System Tools Event Viewer Application MyServiceLog ...
1
by: Jacob | last post by:
I have the following code in a class... --------------------------------------------------------------------------------- .... Private _eL As EventLog = Nothing Private _eLName As String =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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...
0
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...

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.