Unable to create an Event Log entry

Posted: 04-15-2007, 04:08 AM
I am attempting to make an event log entry, but get the following exception:

System.Security.SecurityException: The source was not found, but some or all
event logs could not be searched.

The code is:
if (!EventLog.SourceExists("VCS 2005 Recipes"))
{
EventLog.CreateEventSource("VCS 2005 Recipes", "Application");
}
EventLog.WriteEntry("VCS 2005 Recipes",
"A simple test event.",
EventLogEntryType.Information,
1,
0,
new byte[] { 10, 55, 200 }
);

Any help will be appreciated. TIA

Unable to create an Event Log entry


Responses to "Unable to create an Event Log entry"

 
LinkBack Thread Tools Display Modes
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to create new folders April Windows Vista File Management 8 10-16-2007 04:45 AM
Missing registry entry for imaging devices - pls could someone create a reg file dave.logan1@tiscali.co.uk Windows XP Device Drivers 10 04-15-2007 12:01 PM
Unable to fetch the Event Log - Event Description Vineet Das Windows Vista Security 4 08-24-2006 06:52 AM
Create entry for a serial number Richard Perry Windows XP WMI 0 11-23-2004 09:24 PM
unable to create clips ferdie Windows XP Movie Maker 1 04-27-2004 11:20 PM