Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Security > Unable to create an Event Log entry

Reply
Thread Tools Display Modes

Unable to create an Event Log entry

 
 
joe
Guest
Posts: n/a

 
      04-15-2007
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
 
Reply With Quote
 
 
 
Reply

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to create VPN Jeff Viola Windows Vista Networking 3 02-06-2008 10:48 PM
custom action, error 2869, want to create sql express db and init registry entry rmgalante@galaware.com Windows Vista General Discussion 2 09-14-2007 11:53 AM
Unable to access event log Darth Haxor Windows Vista Security 1 05-25-2007 07:36 PM
Unable to access Event Log Darth Haxor Windows Vista Security 3 05-24-2007 03:19 PM
Unable to fetch the Event Log - Event Description Vineet Das Windows Vista Security 4 08-24-2006 06:52 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59