Event Log Entry - excess info

M

MattC

I am able to successfully make entries into the Event Log for my Web App but
all the entries have this before my text:

The description for Event ID ( 0 ) in Source ( Conquest ) 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 Text here.

How can I stop this being writen to the log entry.

TIA

MattC
 
J

John Saunders

MattC said:
I am able to successfully make entries into the Event Log for my Web App
but all the entries have this before my text:

The description for Event ID ( 0 ) in Source ( Conquest ) 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 Text here.

How are you logging the entry?

Perhaps you should supply an event id?

John Saunders
 
M

MattC

public class EventLog
{
#region Private Members
System.Diagnostics.EventLog myLog;
private string _logname = "";
#endregion

public string LogName
{
get{ return _logname; }
}

#region Constructors
public EventLog(string eventLogName)
{
_logname = eventLogName;

if(!System.Diagnostics.EventLog.SourceExists(_logname))
{
System.Diagnostics.EventLog.CreateEventSource(_logname, _logname);
}

myLog = new System.Diagnostics.EventLog(); //Create a new EventLog object
myLog.Source = _logname;
}
#endregion

#region Methods
public void WriteToLog(string text)
{
WriteToLog(text,System.Diagnostics.EventLogEntryType.Error);
}
public void WriteToLog(string text, System.Diagnostics.EventLogEntryType
msgtype)
{
try
{
myLog.WriteEntry(text, msgtype);//Write the log
}
catch(Exception e)
{
text = e.Message;
//we should email to the system admin person
}
}
#endregion
}
 
B

bruce barker

when you log events, the event log looks at the eventid, and in the assigned
message dll (see registery entry "EventMessageFile" for your application)
for a resource string with the same id as the message. this string is used
to format the eventlog message. the error you are getting means the resouce
file has no format string for entry 0.

-- bruce (sqlwork.com)


| I am able to successfully make entries into the Event Log for my Web App
but
| all the entries have this before my text:
|
| The description for Event ID ( 0 ) in Source ( Conquest ) 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 Text here.
|
| How can I stop this being writen to the log entry.
|
| TIA
|
| MattC
|
|
 
M

MattC

Nope, now I get "The description for Event ID ( 7 ) in Source (....."

What is this message DLL it refers to?

TIA

MattC
 
J

John Saunders

MattC said:
Nope, now I get "The description for Event ID ( 7 ) in Source (....."

Just for fun, try ID 1000. That's a favorite of mine.

John Saunders
 
M

MattC

:(

"The description for Event ID ( 1000 ) in Source".....

What should the descriptions for the events look like and where are they
held??

TIA

MattC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top