Günlük kaydı için log4net kullanıyorum. Kayıt yapılandırmam ayrı bir dosyada saklanır.log4net yapılandırma istisnası
Web.Config: AssemblyInfo.cs
[assembly: log4net.Config.XmlConfigurator(ConfigFile="Log4Net.config", Watch = true)]
Ve ben LogManager başlatmak, ben bu hatayı olsun benim yapılandırma dosyası belirtme configSections
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
"System.TypeLoadException"
message: Could not load type 'log4net.Config.Log4NetConfigurationSectionHlandler' from assembly 'Log4net'.
Evet "Log4NetConfigurationSectionHlandler '" yazıyor, bu bir yazım hatası değil
ve daha sonra bu hata
An error occurred creating the configuration section handler for log4net: Could not load type 'log4net.Config.Log4NetConfigurationSectionHlandler' from assembly 'Log4net'.
Düzenleme: çalıştı ayrı bir log4net.config dosyasında yapılandırma varsa gerekmez
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" />
yinelenen: http://stackoverflow.com/questions/1321261/configuring-log4net-with-xml-file –
Düzenleme: Ben sadece benim web.config bir tür "Log4NetConfigurationSectionHlandler" bulunduğunu tespit etmişlerdir web.config'ten geldi. Bu çalışmayı bir dış yapılandırma dosyasıyla ( – ram