IPv6 Support for Mono based servers

Hi Guys,

Just wondering if there is any plan to support IPv6 bindings when running servers built using the SDK on Mono? I ran into some problems with it whilst testing a .NET command line server and with strace found it was trying IPv6 and failing. Disabling the BindV6 property allowed the server to run on IPv4 just fine! I’ve included the error below, there is nothing running on the assigned port of 8099.

A quick look at your newsgroup shows me that someone else had the same problem back in July '09.

I’m using version 2.6.7 of the Mono framework which shouldn’t have a problem creating IPv6 bindings, so I’m wondering if it’s an issue with the current InternetPack?

Our product is moving to support IPv6 and it would be nice, if we are going to use this software, to publish the web services we create on that protocol as well.

Works fine on the windows.

Cheers,
Jamie


RemObjects SDK for .NET - C# Command Line Server

Unhandled Exception: System.Net.Sockets.SocketException: Address already in use
at System.Net.Sockets.Socket.Bind (System.Net.EndPoint local_end) [0x00000] in :0
at RemObjects.InternetPack.ServerBinding.Bind (IListener aListener) [0x00000] in :0
at RemObjects.InternetPack.Server.Open () [0x00000] in :0


Thanks, logged support request as bugs://47547
Posted by Bugs for Mac

Afaik, IPv6 support was disabled by default due to bugs in Mono/Linux a few releases back. I think this has been fixed on Mono’s side now and you can just enable v6 using the properties…

Enabling v6 binding breaks the server when running in Mono I’m afraid. I had a look and I can see there were issues with ipv6 a few years ago in the mono project, but it looks like they are all resolved now.

I’m not particularly clued up on .NET/Mono development but I’ve now had a quick scan through the code for the Internet Pack and it looks like it’s doing the right thing, so it brings it back to a Mono issue.

Has anyone had a server configured to use IPv6 and run on Mono without any problems?

I’m currently doing this to work around it.

if (Type.GetType(“Mono.Runtime”) != null)
{
serverChannel.HttpServer.BindV6 = false;
}
serverChannel.Port = 8099;
serverChannel.Activate();

Cheers,
Jamie

It seems that IPv6 binding in Mono also binds to IPv4 (and this causes an exception because at this moment active IPv4 binding already exists).

Workaround if to enable BindV6 binding and to disable BindV4 binding at the same time (please note that after this IPv4 access will work for server app running on Mono but will be disabled for same server app running on .NET framework).

I was able to get sample MegaServer respond to both http://127.0.0.1:8099/bin and http://[::1]:8099/bin (ie both IPv4 and IPv6) on Mono / Kubuntu 11.04 by setting BindV4 to false

An issue 47558 was raised to properly handle IPv4 and IPv6 binding options on Mono