我目前正在将 Log4net 从 1.2.10.0 升级到 1.2.11.0。配置没问题,一切看起来都很好,它也适用于Chainsaw,创建日志,我看到实际记录的内容。
但我得到:
log4net:ERROR Failed to Marshal remoting sink
System.MethodAccessException:
Attempt by method 'log4net.Plugin.RemoteLoggingServerPlugin.Attach(log4net.Repository.ILoggerRepository)' to access method 'System
.Runtime.Remoting.RemotingServices.Marshal(System.MarshalByRefObject, System.Str
ing, System.Type)' failed.
at log4net.Plugin.RemoteLoggingServerPlugin.Attach(ILoggerRepository reposito
ry)
https://github.com/apache/log4net/blob/trunk/src/Plugin/RemoteLoggingServerPlugin.cs
我真的不知道 .net 中的这个新安全功能,我想避免“在我的计算机上工作”问题。
有没有办法解决这个错误?最终如何不在远程服务上使用调用这个 Marshal 的东西,并且可以登录到 Chainsaw?