Log4Net local address problem in Windows7

I recently migrated my solution from an XP computer to a Windows7 machine.

I use Log4Net in my solution and Log2Console for reading using UDP

When I use the following configuration, Log2Console does not get any results:

    <appender name="UdpAppender" type="log4net.Appender.UdpAppender">
        <remoteAddress value="localhost" />
        <remotePort value="7071" />
        <layout type="log4net.Layout.XmlLayoutSchemaLog4j" />
    </appender>

However, if I am NSLookup to discover my current IP address, it does

<appender name="UdpAppender" type="log4net.Appender.UdpAppender">
    <remoteAddress value="192.168.1.64" />
    <remotePort value="7071" />
    <layout type="log4net.Layout.XmlLayoutSchemaLog4j" />
</appender>

127.0.0.1 does not work either.

Can someone explain what happened and how can I fix it? I clearly don't want to use a dynamically assigned IP address in a source controlled project!

Thanks in advance

+3
source share
1 answer

, Log4Net IPV6, , hosts.

-, :: 1 127.0.0.1, localhost. IPV4 ( , IPV6, , , IPV6 Log2Console)

: -, v1.2.11 .

+3

All Articles