i'm going to build a instant messager and now i have to decide how i implement the networking. So far i only worked with Sockets (TCP or UDP). Now i heared about RMI (in Java) and want this in my C#-Chatapplication too.

There is .NET Remoting and WCF. I think building the instant messager with Sockets is not a good idea, right? But that should i use? .NET Remoting or WCF? .NET Remoting seems to be the older technologie and is similar to Java RMI. I read that .NET Remoting is faster than WCT (article from 2007).

Which technologie should i use for my instant messager? I want to send formatted text from the richtextbox and inline images. Furthermore i want to exchange files from chat-client to chat-client.

For .NET Remoting i found a tutorial which uses


But this is marked as obsolete. Is .NET Remoting a obsolete technologie? Is it possible to send images and files with WCF or .NET Remoting or are Sockets the better choice?

I read that WCF is a collection of networking technologies (Web Services, Remoting, ...) but if i search for WCF and remote method invocation i only get examples for Web Services...

BTW: Later, i want to implement a Web-Client for my instant messager with ASP.NET. Are there some limitations respective to Networking (WCF/Remoting)?

Thank you :)

Accepted Answer

.NET Remoting is maintained for backward compatibility only as of .NET 3.0. Thus, if you are going to be using .NET 3.0 or greater, use WCF.

For your immediate use, I would suggest the NetTcpBinding. You can then select a more appropriate binding using the following chart.

WCF Binding Selection Flow Chart.

Finally, to learn about WCF, refer to this SO question.

Written by Matt Davis
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki