![](/img/trans.png)
[英]Remoting server forcibly closing client connections in the middle of remote calls
[英]Remoting objects and remote connections
我正在使用.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" ) )
,它總是超時。 我沒有在防火牆后面,並且端口已正確轉發。 由於某些原因,我可以將此端口用於基於套接字的應用程序,但不能用於遠程處理。 請幫忙!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.