Port exchange net.tcp and mono

in my self-contained WCF application I have a problem using port sharing with mono. Given the following code, this is an exception:

System.Net.Sockets.SocketException: address is already in use

and here is my code:

NetTcpBinding tcpBinding = new NetTcpBinding(); ServiceHost host1 = new ServiceHost(myService1); host1.AddServiceEndpoint(typeof(IMyService1Contract), tcpBinding, "net.tcp://192.168.0.70:8075/service1"); host1.Open(); ServiceHost host2 = new ServiceHost(myService2); host2.AddServiceEndpoint(typeof(IMyService2Contract), tcpBinding, "net.tcp://192.168.0.70:8075/service2"); host2.Open(); 

I already found this error report here https://bugzilla.xamarin.com/show_bug.cgi?id=277 . Unfortunately, there has never been an answer to the last comment.

Like the one who wrote the report, my code works fine with windows / .net, but on my Linux machine using mono 2.10.8.1 (raspberry pi, Debian soft-float) the specified exception occurs.

Thank you for your reply!

0
source share

All Articles