WCFホストを実行する方法は次のとおりです。
var baseAddress = new Uri("net.tcp://localhost:2222/blah");
var binding = new NetTcpBinding();
binding.Security.Mode = SecurityMode.Transport;
var sh = new ServiceHost(typeof(MyServiceImpl), baseAddress);
sh.AddServiceEndpoint(typeof(IMyService), binding, baseAddress);
sh.Open();
これが私のクライアントです:
Uri uri = new Uri("net.tcp://localhost:2222/blah");
var address = new EndpointAddress(uri);
var binding = new NetTcpBinding();
binding.Security.Mode = SecurityMode.Transport;
var client = new MyServiceClient(binding, address);
client.Open();
Mono 2.10 ランタイムを使用してクライアントとサーバーの両方を実行すると、すべてが機能します。しかし、サーバーが .NET 4.0 で実行されている場合、System.IO.IOException: Read failure ---> System.Exception: An existing connection was forcibly closed by the remote host
. また、すべて正常に動作することも確認しましたbinding.Security.Mode = SecurityMode.None
。これらの 2 つのランタイムを適切に機能するセキュリティと相互運用できる可能性はありますか?