473,811 Members | 3,241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

EventLog.WriteE ntry 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.Diagnost ics.EventLog.Wr iteEntry("MySou rce", "My Message",
EventLogEntryTy pe.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 1876

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

Similar topics

4
3105
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? Thanks! John
5
4031
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: {System.InvalidOperationException} : {System.InvalidOperationException} HelpLink: Nothing InnerException: {System.ComponentModel.Win32Exception}
0
376
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 Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) at System.Diagnostics.EventLog.CreateEventSource(String source, String logName, String machineName, Boolean useMutex)
1
15992
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 log?! I have simplified my code into this tiny snippet: EventLog.CreateEventSource("mySrc", "myLog1");
7
7466
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 web app before it displays the default page. <healthMonitoring> <rules> <add name="All Events" eventName="All Events" provider="EventLogProvider" profile="Critical" />
0
1820
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 resourceful.mc content is like this. MessageId=0x1 Severity=Success SymbolicName=INSTALL_CATEGORY
0
6102
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: void writeToEventLog(string msg, bool error) {
2
1190
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 <--- new entry
1
3563
by: Jacob | last post by:
I have the following code in a class... --------------------------------------------------------------------------------- .... Private _eL As EventLog = Nothing Private _eLName As String = My.Settings.EventLogName Private _sourceName As String Private Sub New() ' Require user passes source name.
0
9724
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10644
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10379
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9201
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7665
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5552
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.