为什么.NET Remoting的服务器无法发送事件给网络客户端客户端、事件、服务器、网络

2023-09-04 01:26:55 作者:Monster 怪兽

像你知道,.NET Remoting的有一定的限制,其中之一是,服务器无法通过NAT /防火墙发送事件给互联网用户。

Like you know, .NET Remoting has some limits, one of them is that server can't send event to internet clients across NAT/firewall.

这是一个证据:http://social.msdn.microsoft.com/forums/en-US/netfxremoting/thread/6a91626a-3c44-45a1-b0f8-dbf4042f51e4/

今天,我有一个计划,以提高.NET远程处理,使服务器可以发送事件给互联网用户。我不研究.NET Remoting的深深的,所以我不知道为什么.NET Remoting的有这个问题的原因。任何人都可以给我一些解释?

And today, I have a plan to improve .NET Remoting so that server can send event to internet clients. I don't research .NET Remoting deeply, so I don't know the reason why .NET Remoting has this problem. Anyone can give me some explains?

我不知道我是否能解决这个问题没有?

And I don't know whether I could fix this problem or not?

请帮助我。谢谢你。

推荐答案

.NET Remoting的做,因为插座的使用有其如外界不同的网络不能在内部不同的网络访问服务器的事件和外部客户的限制,彼此在网络上进行通信,在该序列化/ MarshalByRef对象的序列化都依赖于网络本身,因此不能从外部访问与防火墙的地方......这是很老,但是,有四种方式要解决这个问题,尽管有变通,以获得在发生的事件......

.NET Remoting does have its limitations such as events and external clients outside a different network cannot access the server internally on a different network, because of the usage of sockets to communicate with each other on the network, in that the serialization/deserialization of MarshalByRef Objects are tied to the network itself and hence cannot be accessed externally with a Firewall in place... And it is quite old, however, there are four ways to deal with this, despite there are workarounds to get events in place...

使用第三方,获取周围的防火墙限制,如 DotNetRemoting 或的 GenuineChannels 。已经使用GenuineChannels,有对公司本身和它的声音的一些问题,遇到了麻烦,因为我购买了他们的组成部分,但有内部问题...有对第三方组件一个学习的过程,因为它不符合远程处理的正常约定。该事件处理机制是强大的,做的工作,但它蔑视为dicatated微软远程处理时随.NET 1.1的逻辑。 在我写的 $ C $的CProject 的一篇文章可以帮助解决了远程framework..by重定向来自外部IP地址,内部网络的限制......,可以帮助你在你的情况下,周围的防火墙结构的限制得到... 修改单的来源为远程处理架构,消除了限制,并实现事件......但AFAIK,有一个与序列化了障碍/ MarshalByRef的反序列化对象,因为它们不与远程的序列化/反序列化100%兼容。 转到与现代和学习/使用WCF(Windows通信框架),它取代了旧的远程处理框架... Use a third party that gets around the Firewall limitation such as DotNetRemoting or GenuineChannels. Have used GenuineChannels, there's some questions about the company itself and by the sound of it, in trouble, as I purchased their component, but there was internal problems...There is a learning curve on the third party components as it does not follow the normal conventions of Remoting. The event handling mechanism is powerful and does work but it defies the logic as dicatated by Microsoft when Remoting came with .NET 1.1. I have written an article on CodeProject that may help get around the limitation of the Remoting framework..by redirecting traffic from the external IP address, to the internal network...that could help you get around the limitation of the firewalling structure in your case... Modify the Mono's sources for the Remoting framework to remove the limitation and implement events...but AFAIK, there is a snag with the serialization/deserialization of MarshalByRef objects in that they are not 100% compatible with Remoting's serialization/deserialization. Go with the modern times and learn/use WCF (Windows Communication Framework) which supersedes the old Remoting framework...

如果该应用程序是传统的,它可能是值得你尝试使用我的流量重定向code首先,检查它是否工作在你的情况......也就是说,发送/接收事件......

If the application is legacy, it might be worth your while to experiment with my traffic redirecting code first and check if it works in your case...that is, send/receive events...