Windows 컴퓨터에서 정상적으로 작동하고 대부분 내 Mac에서 작동하는 모노 호환 응용 프로그램을 작성했습니다. 현재 작동하지 않는 영역은 WCF (ChannelFactory)를 사용하여 서버와 클라이언트간에 통신하는 계층입니다.OSX에서 모노 WCF 문제
이문제는 내가 시도하고 서버에서 ChannelFactory에를 열 때 나타납니다 여기에 코드입니다 :
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();
문제가 .Open() 호출입니다 - 단지에 중단 된 것으로 보입니다 내 맥. 엔드 포인트를 생성하는 작업은 내 PC보다 (약 3-4 초) 작성하는 데 시간이 오래 걸리지 만 WCF 레이어를 작동 시키려면이 작업을 수행 할 수 있습니다.
누구든지이 문제를 해결하는 방법에 대한 제안 사항이 있습니까?
모노 버전은 무엇입니까? – TheNextman
mono --version은 내 Mac에서 2.6.7을 반환합니다. 이 글을 쓰는 시점에서 가장 최근의 안정적인 릴리즈입니다. – Mattl
이것을 읽는 누군가를위한 메모. 나는 최신 버전과 코드의 빠른 리펙터로 문제를 해결했다. – Mattl