Question

I am trying to get the Remoting appender to work in log4net. I have implemented the method shown in these posts and I see the server object listening on the correct port, but I cannot get the client object to actually make the remoting connection. Client and server are both running on the same machine (my development box) so it should not be a firewall issue. I implemented the TimedRemotingAppender as show in the posts, and I can set a breakpoint on the LogEvents method, and see that it hits the breakpoint whenever I call log4net, but nothing ever appears at the server. I'm pretty sure I have the config files correct.

Any log4net gurus out there, is there a trick to getting this to work?

Thanks, Peter

Was it helpful?

Solution

OK, I figured out that it is not really a log4net issue. I made a change elsewhere in my code, changing this line of code:

RemotingConfiguration.Configure(null, true);

To this:

RemotingConfiguration.Configure(null, false);

and data started flowing. I'm not sure what extra code I would have to write to get the "secure" version of remoting connections working, but any machine we would do this on is already behind the corporate firewall, so I may not have to fuss with security.

Thanks, Peter

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top