Click here to Skip to main content
15,314,644 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have received an unhandled exception error, and the exception detail is below, can anyone help me to decode this?

Humbly, and thankfully yours.

System.Security.SecurityException was unhandled
  Message=The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security.
  Source=System
  StackTrace:
       at System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly)
       at System.Diagnostics.EventLog.SourceExists(String source, String machineName)
       at AlarmMan.mDebug.WriteEventToLog(String sSource, String StringtoWrite) in C:\Users\tjones\Desktop\SIA Bumper PaintWorks\source\Common.NET\mDebug.vb:line 89
       at AlarmMan.frmMain.WndProc(Message& WinMessage) in C:\Users\tjones\Desktop\SIA Bumper PaintWorks\source\AlarmMan.NET\frmMain.vb:line 4691
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  InnerException: 
Posted
Comments
ZurdoDev 1-May-12 12:55pm
   
It looks like the code is trying to write to the security log and can't.
jonsey29847 1-May-12 14:04pm
   
Is this what gives you that impression?

at AlarmMan.mDebug.WriteEventToLog(String sSource, String StringtoWrite) in C:\Users\tjones\Desktop\SIA Bumper PaintWorks\source\Common.NET\mDebug.vb:line 89

"Inaccessible logs: Security" means that you are trying to write something to the "Security" section of the event log. You could try the "Application" section instead, or write your logs to your own log files.
   
When an application launches, it launches AS the user that launched it.

Normal users cannot write to the Security event log, for reasons that are fairly obvious. They can write to the Application event log though.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900