我正在使用.NET远程处理一些简单的基于观察者的IPC。我遇到了两个问题:
我似乎无法通过TCP接受来自其他计算机的客户端。我正在使用如此配置的TcpChannel:
BinaryServerFormatterSinkProvider serverProv = new
BinaryServerFormatterSinkProvider();
serverProv.TypeFilterLevel = TypeFilterLevel.Full;
BinaryClientFormatterSinkProvider clientProv = new
BinaryClientFormatterSinkProvider();
IDictionary props = new Hashtable();
props["port"] = port;
TcpChannel channel = new TcpChannel( props, clientProv, serverProv );
ChannelServices.RegisterChannel( channel, false );
RemotingConfiguration.RegisterWellKnownServiceType( typeof( Controller ),
"Controller", WellKnownObjectMode.Singleton );
当客户端应用尝试连接( m_Controller = (Controller)RemotingServices.Connect( typeof( Controller ), "tcp://" + ip + ":2594/Controller" ) )
时,它总是超时。我不在防火墙后面,我的端口正确转发。我可以将此端口用于基于套接字的应用程序,但出于某种原因不能用于远程处理。请帮忙!
答案 0 :(得分:0)