Connecting Tech Pros Worldwide Help | Site Map

Cant write to event log

  #1  
Old November 21st, 2008, 08:45 PM
=?Utf-8?B?Q29yeSBKLiBMYWlkbGF3LCBCZXlvbmQwMS5jb20=
Guest
 
Posts: n/a
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
  #2  
Old November 21st, 2008, 09:25 PM
zacks@construction-imaging.com
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
C# log component =?Utf-8?B?R2Vvcmdl?= answers 20 September 17th, 2007 07:55 PM
Global - Session End Event Problem news.microsoft.com answers 5 May 23rd, 2006 02:15 PM
Application_Error not Transferrig to custom page MattC answers 3 November 18th, 2005 08:04 PM
Event that a Exception has ocurred Shukow answers 1 November 15th, 2005 05:17 PM