为什么 .NET Remoting 服务器无法向 Internet 客户端发送事件

发布于 2024-08-24 03:45:01 字数 496 浏览 3 评论 0原文

如您所知,.NET Remoting 有一些限制,其中之一是服务器无法跨 NAT/防火墙向 Internet 客户端发送事件。

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

今天,我有一个改进 .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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夏花。依旧 2024-08-31 03:45:01

.NET Remoting 确实有其局限性,例如不同网络外部的事件和外部客户端无法访问不同网络内部的服务器,因为使用套接字在网络上相互通信,因为 MarshalByRef 的序列化/反序列化对象与网络本身绑定在一起,因此无法通过防火墙从外部访问......而且它已经很老了,但是,有四种方法可以处理这个问题,尽管有 变通办法 使事件到位...

  • 使用绕过防火墙限制的第三方,例如 DotNetRemotingGenuineChannels 。使用过 GenuineChannels,有一些关于公司本身的问题,从它的声音来看,遇到了麻烦,因为我购买了他们的组件,但存在内部问题......第三方组件有一个学习曲线,因为它不遵循远程处理的常规约定。事件处理机制功能强大且确实有效,但它违背了 Microsoft 在 Remoting 随 .NET 1.1 一起提供时所规定的逻辑。
  • 我写了一篇关于 CodeProject 的文章,可能有助于解决远程处理框架..通过将流量从外部 IP 地址重定向到内部网络...这可以帮助您绕过您的案例中防火墙结构的限制...
  • 修改远程框架的 Mono 源代码以消除限制并实现事件...但是据我所知,MarshalByRef 对象的序列化/反序列化存在一个障碍,因为它们与远程处理的序列化/反序列化不是 100% 兼容。
  • 与时俱进,学习/使用 WCF(Windows 通信框架),它取代了旧的远程处理框架...

如果应用程序是遗留的,那么可能值得您先尝试一下我的流量重定向代码,并检查它是否适用于你的情况...也就是说,发送/接收事件...

.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...

  • 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...

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...

无悔心 2024-08-31 03:45:01

.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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文