473,396 Members | 2,098 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,396 software developers and data experts.

Reading Custom Log

Lee
I have created a custom log for my apps to write to. Writing to the log seems
to be no problem, it's when I go to read it I get unexpected results. I have
an application that reads the log and displays it's contents in a grid, and
it also receives event notification from the log when it's updated. When the
event fires I get exactly the text that was logged in exactly the way I
logged, but when I read the entries from the log, or view them from Event
Viewer, I get extra text that's similar to "The description for Event ID ( 0
) in Source ( ReconRptBuild ) 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" .... after this I get my actual event text.

How can I write events to the log that will not generate this extra text?
Jul 21 '05 #1
4 3806
I assume that you are using the .NET EventLog class and Windows 2000 or above.

When you create a custom event log and event source, it is done by adding a
registry entry (.NET will do this for you the first time you write an event
to the log).

The registry key that is created is as follows:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Eventlog\<event log
name>\<event source name>

Under this key, a value is also created (details follow):
EventMessageFile="C:\WINDOWS\Microsoft.NET\Framewo rk\<clr
version>\EventLogMessages.dll"

It is this EventLogMessages.dll file that allows Event Viewer to display the
messages in the form that you are expecting, so I would begin by checking for
the presence of the registry entry and file.

Hope this helps.

"Lee" wrote:
I have created a custom log for my apps to write to. Writing to the log seems
to be no problem, it's when I go to read it I get unexpected results. I have
an application that reads the log and displays it's contents in a grid, and
it also receives event notification from the log when it's updated. When the
event fires I get exactly the text that was logged in exactly the way I
logged, but when I read the entries from the log, or view them from Event
Viewer, I get extra text that's similar to "The description for Event ID ( 0
) in Source ( ReconRptBuild ) 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" .... after this I get my actual event text.

How can I write events to the log that will not generate this extra text?

Jul 21 '05 #2
Lee
The setting is as follows, and I have verified the existance of the dll.

C:\WINNT\Microsoft.NET\Framework\v1.1.4322\EventLo gMessages.dll
Jul 21 '05 #3
So are you saying that, when your application receives notification via the
EntryWritten event, the Message property is correct but, if your application
then were to read the same entry, the Message would come back with the
incorrectly formatted string?

If so, that seems very strange. Presumably none of your messages appear
correctly in Event Viewer? Is this all occurring while you are logged on as
the same user?
"Lee" wrote:
The setting is as follows, and I have verified the existance of the dll.

C:\WINNT\Microsoft.NET\Framework\v1.1.4322\EventLo gMessages.dll

Jul 21 '05 #4
Lee
refer to new posting with today's date.

The message does not appear correctly in the event view
the Message does not appear correctly in my custom viewer, but it's
different thn event viewer
The message is Correct only when received "EntryWritten" Event

This occurs on 2 machines, 1 with XP SP2 (developement), and the other with
Win2k SP4.
Jul 21 '05 #5

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

Similar topics

1
by: Google Mike | last post by:
Tell me if this can be done, and if I have a misconception here. I am writing an app that will be served up in an app farm, and therefore I need to move the session information to the client, not...
1
by: Baillargeon, Sonny | last post by:
I am trying to read in a C struct file that contains sub-structs as part as the data definition. For example: int a /* 4 bytes */ int_t b /* custom struct */ blah_t c /* custom struct */...
6
by: _jpg_ | last post by:
Hi, I need to read (& store) all the custom response headers in an HttpResponse. I am writing an HttpModule and hence do not know what headers could have been added (but need to cache them for...
1
by: jty202 | last post by:
If I have String containing the code of a HTML <table> with data in it, can a dataset read in the data thats contain in a HTML table? If so, can someone show me. Can this also be done with Comma...
1
by: Diffident | last post by:
Hello All, I have created my own custom configuration file. I would like to know about API available to read that config file. Since config file is nothing but an XML file, I could definitetly...
0
by: Joel | last post by:
I am trying to do what I thought would be simple to do ie reading a section from my app.config file. I would like to have custom sections with custom attributes and be able to read/write them. ...
2
by: Joe | last post by:
Anyone can suggest the best method of reading XML and adding data to ListView? Here is the xml data structure:: <xml> <site> <url>http://www.yahoo.com</url> <lastupdate></lastupdate>...
13
by: ACC | last post by:
Hi! I'm developing an application to analyze some information that is inside a text file. The size of the text file goes from 50Mb to 220Mb... The text file is like a table, with "rows" and...
4
by: Amit Maheshwari | last post by:
I need to read text file having data either comma seperated or tab seperated or any custom seperator and convert into a DataSet in C# . I tried Microsoft Text Driver and Microsoft.Jet.OLEDB.4.0...
2
by: Steven Cheng | last post by:
Hi Gary, As for the setting you mentioned, it is used to custimze the received data size limitation of WCF binding(such as NetTcpBinding or HttpBinding). After you have definite a customized...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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,...

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.