Log4net
  1. Log4net
  2. LOG4NET-310

EventLogAppender's ActivateOptions throws SecurityException on Vista/Win2k3 and later when not run as administrator

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.10
    • Fix Version/s: 1.2.11
    • Component/s: None
    • Labels:
      None

      Description

      ActivateOptions uses EventLog.SourceExists which throws an exception of the source hasn't been found in any of the logs the user was allowed to read and there are others (in particular "Security") that the user is not allowed to access.

      This is the reason of one of the unit test errors I reported in LOG4NET-301

      Even if the code catches the exception and assumes the source doesn't exist this won't help as EventLog.CreateEventSource must not be called without administrator privileges either.

        Activity

        Hide
        Stefan Bodewig added a comment -

        Test passes now (by using winlogon as EventSource) and error handling and documentation have been improved.

        Show
        Stefan Bodewig added a comment - Test passes now (by using winlogon as EventSource) and error handling and documentation have been improved.

          People

          • Assignee:
            Unassigned
            Reporter:
            Stefan Bodewig
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development