Non-admin user writing to the Event Log?
-
using( System.Diagnostics.EventLog evtLog = new System.Diagnostics.EventLog( ) ) { evtLog.Source = "MyAppName"; evtLog.WriteEntry( "SomeMessage" ); }
Any reason why this would not work when the current user isn't an Administrator? If this is the case, what is the correct way to enable event logging for non-admins? Regards, Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
-
using( System.Diagnostics.EventLog evtLog = new System.Diagnostics.EventLog( ) ) { evtLog.Source = "MyAppName"; evtLog.WriteEntry( "SomeMessage" ); }
Any reason why this would not work when the current user isn't an Administrator? If this is the case, what is the correct way to enable event logging for non-admins? Regards, Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
dabs wrote:
Any reason why this would not work when the current user isn't an Administrator?
Yup. The sys admins have locked down your event log - you need to get them to open the privileges on them.
Deja View - the feeling that you've seen this post before.
-
using( System.Diagnostics.EventLog evtLog = new System.Diagnostics.EventLog( ) ) { evtLog.Source = "MyAppName"; evtLog.WriteEntry( "SomeMessage" ); }
Any reason why this would not work when the current user isn't an Administrator? If this is the case, what is the correct way to enable event logging for non-admins? Regards, Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
You can try using impersonation. Ask your administrator to help you with an account that is privileged to write to EventLog.
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson