私は、Windowsマシンでうまく動作し、ほとんどの場合私のMacで動作するモノラル互換のアプリケーションを書いた。現在動作していない領域は、WCF(ChannelFactory)を使用してサーバーとクライアント間で通信するレイヤーです。OSXでのモノWCFの問題
問題は、私が試してみて、サーバー上のChannelFactoryを開いたときのように見える、ここにコードスニペットです:問題は.Open()の呼び出しである
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();
- それだけでハングアップしたように見えます私のマック。エンドポイントを作成するのは、自分のPCよりも作成時間が長くなります(約3〜4秒)が、WCFレイヤーを機能させることができるのであれば、これで生きることができます。
誰もこの問題をどのように進歩させるための提案がありますか?
Monoのバージョンは? – TheNextman
mono --versionは私のMacで2.6.7を返します。これは最新の安定版です。 – Mattl
これを読んだ人のためのメモ。私は最新バージョンとコードの簡単なリファクタを使って問題を解決しました。 – Mattl