log4net没有记录和抛出错误

当我的Web服务中有任何exception时,我一直在使用log4Net写入文本文件,这是有效的,但今天它开始抛出错误。

System.Web.Services.Protocols.SoapException: Server was unable to 

处理请求。 —> System.TypeInitializationException:..的类型初始值设定项引发exception。 —> System.IO.FileLoadException:无法加载文件或程序集’log4net,Version = 1.2.9.0,Culture = neutral,PublicKeyToken = b32731d11ce58905’或其依赖项之一。 定位的程序集的清单定义与程序集引用不匹配。 (来自HRESULT的exception:0x80131040)文件名:’log4net,Version = 1.2.9.0,Culture = neutral,PublicKeyToken = b32731d11ce58905′

 WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 

如果您对此堆栈信息有任何输入,请参阅。 分享它。

您是否更改了代码,或者刚刚开始发生这种情况?

我已经看到当目标处理器架构不匹配时会发生此错误。 你有没有机会改变它?

如果不是这种情况,并且您安装了Windows SDK,则可以使用Fusion Log Viewer查看程序集绑定日志。 该实用程序应安装在您的计算机上。