c# - Error loading log4net -
our application includes windows service can run console application debugging & testing purposes. uses log4net write log entries windows event logs.
this morning, installed our application on our development machine, uninstalled it. since uninstalled it, i've started getting following error message whenever start service console application:
log4net:error xmlhierarchyconfigurator: not create appender [eventlogappender] of type [log4net.appender.eventlogappender]. reported error follows. system.security.securityexception: requested registry access not allowed. @ microsoft.win32.registrykey.opensubkey (string name, boolean writable) @ system.diagnostics.eventlog.geteventlogregkey (string machine, boolean writable) @ system.diagnostics.eventlog.findsourceregistration (string source, string machinename, boolean readonly, boolean wanttocreate) @ system.diagnostics.eventlog.deleteeventsource (string source, string machinename) @ log4net.appender.eventlogappender.activateoptions() @ log4net.repository.hierarchy.xmlhierarchyconfigurator.parseappender (xmlelement appenderelement) zone of assembly failed was: mycomputer
can point me in right direction fix this? please note event logging seems working, i'm not clear log4net complaining about.
you need special (elevated) permissions write application log (since using eventlogappender
writes windows event logger).
check permissions current user.
Comments
Post a Comment