1

I am currently upgrading Log4net from 1.2.10.0 to 1.2.11.0. Configuration is ok, everything is looking fine, it works for me also with Chainsaw, logs are created and I see actuall stuff logged.

But i get:

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

I don't really know this new security features in .net and I want to avoid "works on my computer" problems.

Is there way to fix this error? Eventually how not to use stuff that calls this Marshal on remoting services, and could log to Chainsaw?

Mateusz
  • 2,287
  • 20
  • 28
  • http://stackoverflow.com/questions/8297419/log4net-doesnt-pass-verification-when-compiling – David Brabant Jun 04 '13 at 10:00
  • I've seen it, and as you can see on github `Attach` method has this attribute now, and I am not compiling Log4Net from source, I have this as runtime error while running my code. – Mateusz Jun 04 '13 at 10:05
  • 1
    I emailed the mailing-list for log4net, and got a response saying this was fixed in trunk after the 1.2.11 release. https://issues.apache.org/jira/browse/LOG4NET-318 – joshgo Jul 25 '13 at 15:47
  • I think this is valid answer @joshgo, thanks a lot for noticing me of that change. – Mateusz Jul 26 '13 at 05:27

1 Answers1

0

This error is probably known as http://issues.apache.org/jira/browse/LOG4NET-347. Check the bug description there.

Nachbars Lumpi
  • 2,688
  • 1
  • 21
  • 13