logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Cowan" <Paul.Co...@jkd.co.uk>
Subject RE: Windows Event Log and ASP.NET
Date Wed, 07 Sep 2005 15:09:00 GMT
Yes you need to give the following registry key permissions to the
ASPNET account or the IIS_WPG

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog


-----Original Message-----
From: Patten, Stephen [mailto:Stephen.Patten@impaccompanies.com] 
Sent: 07 September 2005 16:04
To: Log4NET User
Subject: RE: Windows Event Log and ASP.NET

Nicko,

Do you have an ASP.NET config section that you use today in production
that writes to the application event log? I know its permissions; do I
need to hack the registry in order for this to work? Everything I've
read suggest not.



Stephen Patten
Shared Services Technical Manager
Impac Funding Corporation
949-274-1141 (Cell)
949-260-4533 (Work)
949-706-6329 (Fax)

-----Original Message-----
From: Nicko Cadell [mailto:nicko@neoworks.com] 
Sent: Tuesday, September 06, 2005 11:43 PM
To: Log4NET User
Subject: RE: Windows Event Log and ASP.NET

This is a permissions problem. See:
http://logging.apache.org/log4net/release/manual/faq.html#HC-32112901 


> -----Original Message-----
> From: Patten, Stephen [mailto:Stephen.Patten@impaccompanies.com] 
> Sent: 07 September 2005 02:24
> To: log4net-user@logging.apache.org
> Subject: Windows Event Log and ASP.NET
> 
> All,
> 
>  
> 
> I can't seem to find the right information on this one. 
> 
>  
> 
>  
> 
> First off here my web.config entry for 1.2.9
> 
>  
> 
>             <log4net>
> 
>                   <appender name="TEST" 
> type="log4net.Appender.EventLogAppender" >
> 
>                         <logName value="TEST2" />
> 
>                         <applicationName value="TEST3" />
> 
>                         <layout type="log4net.Layout.PatternLayout">
> 
>                               <conversionPattern 
> value="%d{yyyMMdd:HHmmss.fffff} [%t] %-5p %c %x - %m%n" />
> 
>                         </layout>
> 
>                         <mapping>
> 
>                               <level value="DEBUG" />
> 
>                               <eventLogEntryType 
> value="Information" />
> 
>                         </mapping>
> 
>                   </appender>
> 
>                   <root>
> 
>                         <level value="ALL" />         
> 
>                         <appender-ref ref="TEST" />
> 
>                   </root>
> 
>             </log4net>
> 
>  
> 
> I've gone into my local registry and created the key/sink to 
> support this under the application log. Basically, what is it 
> going to take to get this to work without giving special 
> permission to aspnet? Here is the infamous error message:
> 
>  
> 
> log4net:ERROR XmlHierarchyConfigurator: Could not create 
> Appender [TEST] of type [log4net.Appender.EventLogAppender]. 
> Reported error follows.
> 
> System.Security.SecurityException: Requested registry access 
> is not allowed.
> 
>    at Microsoft.Win32.RegistryKey.OpenSubKey(String name, 
> Boolean writable)
> 
>    at 
> System.Diagnostics.EventLog.FindSourceRegistration(String 
> source, String machineName, Boolean readOnly)
> 
>    at System.Diagnostics.EventLog.SourceExists(String source, 
> String machineName)
> 
>    at System.Diagnostics.EventLog.SourceExists(String source)
> 
>    at log4net.Appender.EventLogAppender.ActivateOptions()
> 
>    at 
> log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseApp
> ender(XmlElement appenderElement)
> 
> log4net:ERROR XmlHierarchyConfigurator: Appender named [TEST] 
> not found.
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Many thanks to the person who can answer this.
> 
>  
> 
>  
> 
> Stephen
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Stephen Patten
> 
> Shared Services Technical Manager
> 
> Impac Funding Corporation
> 
> 949-274-1141 (Cell)
> 
> 949-260-4533 (Work)
> 
> 949-706-6329 (Fax)
> 
>  
> 
> 



_____________________________________________________________________
VirusChecked for Huntsworth plc
_____________________________________________________________________


_____________________________________________________________________
VirusChecked for Huntsworth plc
_____________________________________________________________________

Mime
View raw message