为什么 .NET Remoting 服务器无法向 Internet 客户端发送事件
如您所知,.NET Remoting 有一些限制,其中之一是服务器无法跨 NAT/防火墙向 Internet 客户端发送事件。
今天,我有一个改进 .NET Remoting 的计划,以便服务器可以将事件发送到互联网客户端。我对.NET Remoting研究不深,所以不知道.NET Remoting出现这个问题的原因。有人可以给我一些解释吗?
而且我不知道我是否可以解决这个问题?
请帮我。谢谢。
Like you know, .NET Remoting has some limits, one of them is that server can't send event to internet clients across NAT/firewall.
This is an evidence: http://social.msdn.microsoft.com/forums/en-US/netfxremoting/thread/6a91626a-3c44-45a1-b0f8-dbf4042f51e4/
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?
Please help me. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
.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...
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...
.NET 远程处理不提供任何安全性或控制,如果您使用 .NET 远程处理,那么您的所有系统都会受到损害。它只能在允许跨应用程序域边界通信的进程中使用。
而是使用 WCF。 WCF 提供能够跨越防火墙等的标准和自定义传输。当您开始学习曲线时,请从有前途的东西开始。
.NET Remoting gives NO SECURITY or control, if you use .NET remoting expect all your systems to be compromised. It should only be used within a process to allow cross-App-Domain boundary communications.
Instead use WCF. WCF provides standard and custom transports that are able to cross firewalls etc.. As you are starting on the learning curve, start with something that has a future.