简体   繁体   English

在.Net Remoting中,如果未在配置文件中指定远程服务或在代码中注册一个,则使用哪些默认设置?

[英]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?

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. 我继承了.NET Remoting应用程序,当尝试向服务器注册共享对象时,客户端会出现问题。 This registration occurs an arbitrary period of time after the server is started with a call to 'register' on a shared ILease object. 在通过在共享ILease对象上调用“register”启动服务器之后,此注册会在任意时间段内发生。

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. 在遵循代码路径的过程中,我试图找出RemotingServices.MarshalRemotingServices.RegisterWellKnownSericeType调用存储信息的位置。 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 . 我的前一个问题的回答使我明白,应用程序指定无论是在.EXE的文件configuation,或使用存储这些信息的服务RemotingConfiguration.RegisterWellKnownClientType调用,如证实这里

Question

Our application uses neither a configuration file nor RegisterWellKnownClientType to register a remoting service, but uses .NET remoting successfully. 我们的应用程序既不使用配置文件也不使用RegisterWellKnownClientType来注册远程服务,但成功使用.NET远程处理。 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. 我无法从.NET的开源参考代码或通过我看过用于.NET Remoting的“默认”服务的文章中找到答案。 So, does anyone know what the default settings used for .NET Remoting service are? 那么,有谁知道.NET Remoting服务使用的默认设置是什么?

Thanks! 谢谢!

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 . 正如Andy在链接问题的评论中所建议的那样,答案是为.NET Remoting运行时注册通信系统有第三种选择: 直接使用远程服务注册TCP通道对象 Eg: 例如:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM