Hi. I need to start logging my application in the Windows Event Log. I
found some sample code and it works from a Windows Form. So I put it
into my asp.net application and initially had a problem that I found I
just needed to create a registry key as outlined in this kb article:
http://support.microsoft.com/default...b;en-us;329291
So now I get a log entry in my event log, and the entry I specified in
the code was: "Invoke called, WebService = False" but in the log I see
all this text, which then ends with what I actually specified in code.
The description for Event ID ( 0 ) in Source ( eCommerce ) 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: Invoke called, WebService = False.
I found some references to other having this issue but no answers.
Anyone know what I need to do to fix this? Thanks!
The code I'm using is this:
Try
'Register the App as an Event Source
If Not objEventLog.SourceExists(AppName) Then
objEventLog.CreateEventSource(AppName, LogName)
End If
objEventLog.Source = AppName
'WriteEntry is overloaded; this is one
'of 10 ways to call it
objEventLog.WriteEntry(Entry, EventType)
Return True
Catch Ex As Exception
Return False
End Try
Thanks,
Matt