Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Debugging ASP.NET application at run-time
Message
 
 
To
16/01/2009 13:42:31
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01374333
Message ID:
01374447
Views:
18
>>>
>>>What is the error?
>>
>>The top portion:
>>
>>
>>SecurityException: The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security.]
>>   System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly) +706
>>   System.Diagnostics.EventLog.SourceExists(String source, String machineName) +101
>>   System.Diagnostics.EventLog.VerifyAndCreateSource(String sourceName, String currentMachineName) +69
>>   System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) +211
>>   System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type) +14
>>
>
>I implemented logging in my app a couple of years ago. I do not recollect having to Create an event source. However, the EventLog.Source Property documentation implies that you need to call EventLog.CreateEventSource to add your source. See the Remarks section in EventLog.Source Property.

I was trying to create Event Source but am getting error too. I don't understand the syntax of this method. Here is what I tried:
string MyAppName = "MyAppName";
EventLog.CreateEventSource( MyAppName, MyAppName);
I know this does not look right but I found a document on the web that has this syntax, two parameters and both are the same.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform