tags:

views:

58

answers:

2

Hello everyone, 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.

+1  A: 

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

Richard
+1  A: 

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

Hope this helps, Best regards, Tom.

tommieb75
Please help me to choose the best solution to solve this problem in my project. Everything is good except server can't send event to internet clients. Thanks.
Lu Lu