I have an application that uses the rolling log appender and the telnet appender. The application can run as either a service or a desktop application. When I run as a desktop app the rolling appender and telnet appender both work and I can telnet to the port and see log messages come through. When I run the app as a service the rolling log appender works but the telnet appender does not.
I have tried netstat -nab and see the port when running as a desktop application, but when run as a service telnet fails to connect to the port and the service exe does not appear in the output from netstat.
I tried changing the service logon to my local account to no avail, and I tried turning off the windows firewall.
Below is my configuration if anyone could shed some light on this I would appreciate the help.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<log4net>
<appender name="rfa" type="log4net.Appender.RollingFileAppender">
<param name="File" value="my.log" />
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Size" />
<param name="MaxSizeRollBackups" value="3" />
<param name="MaximumFileSize" value="10MB" />
<param name="StaticLogFileName" value="true" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%-23date{MM/dd/yy HH:mm:ss fff} %-8level %-25logger - %message%newline" />
</layout>
</appender>
<appender name="ta" type="log4net.Appender.TelnetAppender">
<port value="23" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%-25date{MM/dd/yy HH:mm:ss fff} %-8level %-25logger - %message%newline" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="rfa" />
<appender-ref ref="ta" />
</root>
</log4net>
</configuration>