log4net UdpAppender on IPv6 (Windows 2008, Vista or 7)

Posted by Mikael Östberg | Filed under ,

I love the log4net UdpAppender.

When you are deploying lots of services to lots of servers usually means that you're having limited possibilities to see what's going on, except checking log files but I find that somewhat cumbersome.

I usually use the UdpAppender for log4net combined with Log4View allows me to sit back and just see the messages roll in. Everything from all servers in real time, beautiful.

I have been enjoying this for a long time now, but in my current project the dev machine is Windows Vista and some of the servers run Windows 2008. They both use IPv6 (by default at least) and that is something that didn't make it into the log4net 1.2.10 release. There are some fixes to log4net, but the 1.2.10 version is compiled into loads of other framworks that I'm using and compiling an own version would cause a lot of pain.

Solution for the pragmatic: Disable IPv6 on the machine

This can be done by following the steps on this page on TechNet.

Basically add or edit the registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\DisabledComponents

to 0xFF to disable IPv6 altogether or read the TechNet page to do it more fine grained (it's a bitmask).

Enjoy those Udp datagrams!

Getting fiddler to intercept local request, including requests to Cassini

Posted by Mikael Östberg | Filed under , ,

This is probably something everybody knew but me, but I'll put it here so that I never ever forget it.

It can be very interesting to see what an HTTP based application is actually requesting and that is probably why Fiddler was born. As a developer using Visual Studio and its built-in web server Cassini, I too am interested in what's going on under the hood.

I start my web project from Visual Studio, Explorer opens up. I start fiddler only to see nothing. After a bit of digging online I find that this is easy to solve.

Change http://localhost:1337 to 127.0.0.1.:1337 and fiddler starts tracking my requests.

Note the . before the : in 127.0.0.1.:1337 because that's where the magic is.

Happy fiddling!