Estoy usando log4net para el registro. Mi configuración de registro se almacena en un archivo separado.excepción de configuración log4net
Web.Config: configSections
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
Especificación de mi archivo de configuración en AssemblyInfo.cs
[assembly: log4net.Config.XmlConfigurator(ConfigFile="Log4Net.config", Watch = true)]
Y cuando inicializar mi LogManager, me sale este error
"System.TypeLoadException"
message: Could not load type 'log4net.Config.Log4NetConfigurationSectionHlandler' from assembly 'Log4net'.
Sí dice "Log4NetConfigurationSectionHlandler", no es un error tipográfico
y más tarde, este error
An error occurred creating the configuration section handler for log4net: Could not load type 'log4net.Config.Log4NetConfigurationSectionHlandler' from assembly 'Log4net'.
Editar: Probado sugerencia de Mauricio Scheffer
consiguió
log4net:ERROR XmlConfigurator: Failed to find configuration section 'log4net' in the application's .config file. Check your .config file for the <log4net> and <configSections> elements. The configuration section should look like: <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
duplicado: http://stackoverflow.com/questions/1321261/configuring-log4net-with-xml-file –
Edit: acaba de descubrir que mi web.config tenía un tipo "Log4NetConfigurationSectionHlandler" era de web.config. Todavía estoy trabajando para que esto funcione con un archivo de configuración externo – ram