I agree, should be added to FAQ. There's a MS artcicle here: http://support.microsoft.com/default.aspx?scid=kb;en-us;329291.
But you don't NEED to hack the registry. If it's a problem for you, just remove the LogName and ApplicationName elements from your corn-fig file and you should run out-of-the-box. It's been a little while, but I believe I ran that way at first. Of course, you won't get to have that ApplicationName element jam something nice that you want into the 'Source' field in the EventLog, but if access to the registry is a problem, ... -BillyB -----Original Message----- From: Matthew Brown [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 12, 2005 5:53 AM To: Log4NET User Subject: Re: Inability to use EventLogAppender with ASPNET Adding permission explicitly to the EventLog key (and all subkeys) seems to have done the trick. Maybe this should be added to the FAQ... :) On 10/11/05, Hollywood <[EMAIL PROTECTED]> wrote: > I've been running into this lately. One of the items is to make sure your > have permissions to the event log to write with. > > Check the HKLM\System\CurrrentControlSet\EventLog and make sure whatever > user your process (if WinForms the logged on user or if ASP the > website/webservices' AppPool user) has write permissions to it. > > My appender looks like the following (although the appender config is from a > slightly older version of log4net): > > <appender name="EventLogAppender" type="log4net.Appender.EventLogAppender"> > > > <param name="LogName" value="Application"/> > > <param name="ApplicationName" value="AppName"/> > > > <layout type="log4net.Layout.PatternLayout,log4net"> > > <param name="Header" value="[Log Header]\r\n"/> > > <param name="Footer" value="[Log Footer]\r\n"/> > > <param name="ConversionPattern" value="%c%n[%-5p] %d{ISO8601} .%m%n %x"/> > > </layout> > > > <filter type="log4net.Filter.LevelRangeFilter"> > > <levelMin value="ERROR" /> > > <levelMax value="FATAL" /> > > </filter> > > > </appender> >
