Ich benutze log4net für die Protokollierung. Meine Protokollierungskonfiguration wird in einer separaten Datei gespeichert.log4net Konfiguration Ausnahme
Web.Config: ConfigSections
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
meine Config-Datei
[assembly: log4net.Config.XmlConfigurator(ConfigFile="Log4Net.config", Watch = true)]
in AssemblyInfo.cs Angeben Und wenn ich meine LogManager initialisieren, ich bekomme diese Fehlermeldung
"System.TypeLoadException"
message: Could not load type 'log4net.Config.Log4NetConfigurationSectionHlandler' from assembly 'Log4net'.
Ja es heißt "Log4NetConfigurationSectionHlandler", es ist kein Tippfehler
und später, dieser Fehler
An error occurred creating the configuration section handler for log4net: Could not load type 'log4net.Config.Log4NetConfigurationSectionHlandler' from assembly 'Log4net'.
Edit: Versuchte Mauricio Scheffer Vorschlag
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" />
Duplikat: http://stackoverflow.com/questions/1321261/configuring-log4net-with-xml-file –
Edit: Ich fand nur, dass meine web.config eine Art "Log4NetConfigurationSectionHlandler" hatte war aus web.config. Ich arbeite immer noch daran, diese Arbeit mit einer externen Konfigurationsdatei zu bekommen – ram