In .Net Remoting, if you don't specify a remoting service in a configuration file or register one in code, what default settings are used?

人盡茶涼 提交于 2019-12-11 06:59:30

问题


Context

I've inherited a .NET Remoting application which is having a problem where clients hang when trying to register shared objects with the server. This registration occurs an arbitrary period of time after the server is started with a call to 'register' on a shared ILease object.

In the process of following the code path, I am trying to figure out where calls to RemotingServices.Marshal and RemotingServices.RegisterWellKnownSericeType are storing their information. My previous question's answer lead me to understand that applications specify the service that stores this information in either the .exe's configuation file, or using the RemotingConfiguration.RegisterWellKnownClientType call, as corroborated here.

Question

Our application uses neither a configuration file nor RegisterWellKnownClientType to register a remoting service, but uses .NET remoting successfully. I haven't been able to figure out from .NET's open-source reference code or from the articles through which I've looked what 'default' service is used for .NET Remoting. So, does anyone know what the default settings used for .NET Remoting service are?

Thanks!


回答1:


As suggested by Andy in the comments of the linked question, the answer is that there's a third option for registering a communication system for the .NET Remoting runtime: directly registering a TCP channel object with the remoting services. E.g.:

TcpChannel.TcpChannel ipcChannel = new TcpChannel(...);
System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel( ipcChannel, false );


来源:https://stackoverflow.com/questions/37331444/in-net-remoting-if-you-dont-specify-a-remoting-service-in-a-configuration-fil

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!