Mono WCF issue on OSX

I wrote a mono compatible application that works fine on a Windows computer and works mostly on my Mac. The area that is currently not working is the layer that uses WCF (ChannelFactory) to communicate between the server and the client.

The problem occurs when I try to open ChannelFactory on the server, here is the code snippet:

string address = "21"; // added this for simplicity in conveying the problem...
string server_address = "net.tcp://192.168.1.122:4505/DeviceServer/";
string serviceAddress = string.Format(server_address, address);

ThreadedServiceHost<DeviceService, IDeviceContract> DeviceHost =
            new ThreadedServiceHost<DeviceService, IDeviceContract>(serviceAddress, address, new NetTcpBinding());

EndpointAddress endPoint = new EndpointAddress(
                     new Uri(string.Format(serviceaddress, address) + address));

System.ServiceModel.Channels.Binding binding = new NetTcpBinding();

teeGlobal.ServerDeviceFactory = new ChannelFactory<IDeviceChannel>(binding, endPoint);
teeGlobal.ServerDeviceFactory.Open();

Problem with calling .Open () - it just appears on my mac. Creating an endpoint takes much longer than on my PC (about 3-4 seconds), but I can live with it if I can make the WCF layer function.

Does anyone have any suggestions on how to move forward on this issue?

+3
source share
1 answer

Mono - 2.8.2 (http://www.go-mono.com/mono-downloads/download.html)

, - . WCF 2.6.x " ", - , . 2.8 .

+2

Source: https://habr.com/ru/post/1783137/


All Articles