Connecting Tech Pros Worldwide Forums | Help | Site Map

Cant write to event log

=?Utf-8?B?Q29yeSBKLiBMYWlkbGF3LCBCZXlvbmQwMS5jb20=
Guest
 
Posts: n/a
#1: Nov 21 '08
Hi,

I am trying to learn how to write key events to the application event log.

I create a new windows application (not ASP) and use the following code:

My.Application.Log.WriteEntry("Please show in the application log")

I get nothin'.... I am running Vista SP1 and using VS 2008 (VB.net 2008)

Thanks much!

Cory

zacks@construction-imaging.com
Guest
 
Posts: n/a
#2: Nov 21 '08

re: Cant write to event log


On Nov 21, 3:38*pm, Cory J. Laidlaw, Beyond01.com
<CoryJLaidlawBeyond01...@discussions.microsoft.com wrote:
Quote:
Hi,
>
I am trying to learn how to write key events to the application event log..
>
I create a new windows application (not ASP) and use the following code:
>
*My.Application.Log.WriteEntry("Please show in the application log")
>
I get nothin'.... I am running Vista SP1 and using VS 2008 (VB.net 2008)
>
Thanks much!
>
Cory
Apparently you do not have the Log's listener configured correctly.

Personally, I prefer to use an instance of the EventLog class in the
System.Diagnostics namespace to write to an event log.
Closed Thread