473,508 Members | 2,008 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Appended text in the message

Hi,

I use the following way to write to the Windows Event Log from my C#
application.

EventLog eventLog = new EventLog();
eventLog.Source = "My Source";

eventLog.WriteEntry("Just a test:",EventLogEntryType.Error);

Initially i was using 1.0 framework with VS 2002. It wrote "Just a test" to
the event log. Now I updated to 1.1 framework and VS2003. Now it writes:

"The description for Event ID ( 0 ) in Source ( ServiceName ) cannot be
found. The local computer may not have the necessary registry information or
message DLL files to display messages from a remote computer. The following
information is part of the event. Just a test"

What can i do to suppress the additional information that is appended with
my message. I just want to display my own message. Thanx in advance.
Nov 16 '05 #1
1 874
Found the problem....actually my application in this registry hive:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Eventlog\Application\My
ApplicationName

was pointing to this path:

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

which i had removed from my system. I gave it the correct path of 1.1 and it
solved the problem.

"Wajih-ur-Rehman" <wr*****@ro1.adiscon.com> wrote in message
news:Ot**************@tk2msftngp13.phx.gbl...
Hi,

I use the following way to write to the Windows Event Log from my C#
application.

EventLog eventLog = new EventLog();
eventLog.Source = "My Source";

eventLog.WriteEntry("Just a test:",EventLogEntryType.Error);

Initially i was using 1.0 framework with VS 2002. It wrote "Just a test" to the event log. Now I updated to 1.1 framework and VS2003. Now it writes:

"The description for Event ID ( 0 ) in Source ( ServiceName ) cannot be
found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event. Just a test"

What can i do to suppress the additional information that is appended with
my message. I just want to display my own message. Thanx in advance.

Nov 16 '05 #2

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

Similar topics

2
2117
by: Karuppasamy | last post by:
Hi I am using a variable of StringBuilder to form a string. After appending a string of value like this {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Verdana;}}
1
1988
by: Victor | last post by:
I'm retrieving values from the textboxes that I created dynamically. However I get commas appended to my text values and just a comma wherever the textbox is empty. Dont know what is causing this....
2
2164
by: Matt | last post by:
I wrote the tcp socket client-server program that the server will echo the message received from the client. In client program: char sendBuf; while(1) { cout << "Enter message:";...
1
254
by: Wajih-ur-Rehman | last post by:
Hi, I use the following way to write to the Windows Event Log from my C# application. EventLog eventLog = new EventLog(); eventLog.Source = "My Source"; eventLog.WriteEntry("Just a...
10
1212
by: | last post by:
Hi, I am using TextBox1.AppendText, but I want the view to always be scrolled to the very bottom. Any ideas?
4
1652
by: thenewuser | last post by:
Hi all, I am working on windows 2000 and using php 5.0 and apache 2.0.59. I am facing a problem while parsing a text file.Actually I am using a pop server for parsing an email.I am downloading...
5
2342
by: libsfan01 | last post by:
Hi all Im trying to write a script that pulls data from another page (which is getting data from a db). The contents displayed on the db handling page (display.php) gets transferred through...
2
1349
by: Dave Almighty | last post by:
I've spent the last couple of hours looking desperately through every corner of the internet for a solution to the following question (and my teeth have been ground down almost to nothing). With a...
1
1765
by: mlcottingham | last post by:
I know the system has the number, since it displays it in the text box after the OpenQuery statement runs, but I cannot figure out how to grab it: This 2 query loop runs fine manually or if I...
4
6907
by: rubenhan | last post by:
Hey, guys. My basic idea is this. When I write "1" in the pre-existing text field and onblur, I want to add a new field with a set of attributes, which turned out to be the same as the pre...
0
7227
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
7127
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
7331
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,...
1
7054
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
7501
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
4713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3204
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...
0
1564
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
768
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.