I have a console app that will be running through a scheduled task and what i’d like to do is have it write to an Event Log in a catch block. I’ve tried using
EventLog.WriteEntry("My App Name","Error Message - " ex.ToString() );
but for some reason it is not writing the error.
Am i doing something wrong?
Thanks
You need to make sure the event-source exists, e.g.:
See http://support.microsoft.com/kb/307024