Log4net issue


Episerver is not writing custom and internal logs together. It writes custom logs with the below code in Application_start event but not internal logs. Without the below code it writes internal logs but not custom logs. Its always either or


var logfile = new System.IO.FileInfo(HttpContext.Current.Server.MapPath("log4net.config"));



 Also in the log4net trace I noticed its trying to load old version of log4net ( though we upgraded to version.

Where should I check the Episerver log4net versions? Or how can I find out where its using the older version ?


Please help!

Jul 14, 2014 23:01


The version of log4net should be configurable via assembly dependentAssembly section in web.config.

Add/modify this section in your web.config:



Edited, Jul 15, 2014 6:08

Hi Quan, I did try changing the dependentAssembly in web.config to


but NO luck. 

Also found through Process Explorer, a few process using the old version of log4net from GAC including Episerver.scheduler.svc and noticed these are running on .net framework 2.0.

Trying many things, finally we decided to use a separate config and log file for custom logs and another config and log file for internal logs . Which does what we need ! But still curious why is it still using old version of log4net in a few places. 

On a side note I noticed the base Episerver folder has old dlls which I replaced to new that didnt help either. 

Please share any thoughts or ideas you may have!

Thanks in advance!

Jul 15, 2014 18:21

Note that the publicKeyToken should be 1b44e1d426115821 instead of 669e0ddf0bb1aa2a. You might want to take a look here:



Jul 16, 2014 1:11

Unfortunately It didnt work in our case.
The issue was C:\EpiServer\eCommerceFramework\5.2\XavierCommerceManager\Sites\IntegrationService\bin  had the old version of dll and replacing that with the new version solved the issue.

Thanks and appreciate your help Quan!

Jul 16, 2014 18:16
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.