Mattl
Mattl

Reputation: 1618

Mono WCF issue on OSX

I've written a mono compatible application that works fine on a Windows machine and mostly works on my mac. The area that currently doesn't work is the layer that uses the WCF (ChannelFactory) to communicate between server and client.

The issue appears to be when I try and open the ChannelFactory on the Server, here is a 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();

The issue is with the .Open() call - it just appears to hang on my mac. Creating the endpoint takes a lot longer to create than on my PC (about 3-4 seconds) but I can live with this if I can get the WCF layer to function.

Does anyone have any suggestions on how to progress with this issue?

Upvotes: 3

Views: 711

Answers (1)

TheNextman
TheNextman

Reputation: 12566

The most recent stable release of Mono is 2.8.2 (http://www.go-mono.com/mono-downloads/download.html)

You really need to try with this version before doing anything else. The WCF stack in 2.6.x was more of a 'preview' than anything else, and only some common scenarios actually worked. 2.8 is much more complete.

Upvotes: 2

Related Questions