Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

I want to connect Linux server from my windows .net application.
So which is better way?
I have to user TcpClient or i have to user .Net Remoting
Can any one please help me???

Thanks,
Viprat
Posted

Hi Viprat,


1).NET Remoting should work only if at both parts are .NET framework installed.

2)If on both servers you have installed .NET framework, I trouly recommand to use WCF with net.tcp protocol. This is the best solution for communication in .NET that provide both high security and maximum speed.

3) TCP is more felxible; You could implment an Linux server an application in Java that comunicate with your .NET application from Windows by using sockets (implemented in both parts by using different tehnologies Java and .NET). It also give you highest speed, but you should implement your own portocol for communication. You could also add SSL if you want to add security.

PS: In some old project I have used solutions 1. and 3., but from 2010 I am using only WCF and net.tcp for communication between .NET applications.

Best Regards,
Raul
 
Share this answer
 
v4
Comments
Sergey Alexandrovich Kryukov 27-Feb-13 2:11am    
Reasonable considerations. I voted 4. Not 5 just for minor... I don't know, redundancy, for example, and very questionable evaluations in some parts. Of course, .NET should be installed on both parts if remoting is used; but WCF too. You could then mention different ways of hosting WCF... What is more flexible for what... it depends, very much. WCF is the best? maximum speed? No! "best" cannot be universally defined. And of course, you can make faster or as fast as WCF is you use sockets for equivalent application.
—SA
Raul Iloc 27-Feb-13 4:41am    
I have tried to give solutions to the problem from my experince. As I know WCF is the new way to do the communication between .NET applications, and it will replace all the other ways (Remouting, Web Services, MSMQ). WCF is very configurable and a set of protocols can be used for both transport and security. From the available types of WCF protocolos "net.tcp" is the fastest because is almost TCP (no other layers involved).
This is a totally incorrect question. You cannot reasonable ask such thing before you define the predicate "better", but can you?

Besides, you cannot just use TpcClient. You only can use TcpClient + TcpListener.

You cannot get helped here, but I would suggest: you need to use both, plus WCF. Only this way, you can reasonably evaluate what part of FCL is better for one or another project. And only a person well familiar with your project can give you a reasonable advice.

One more advices: many people say: remoting is obsolete, should always be replaced with WCF. I disagree. I faced just more tricky situation where more flexibility was important, and where remoting was better. With remoting, you do with your own hands a bit more, and this often (but not always) means more flexibility. Again, it all depends on your project, its goals and requirements.

—SA
 
Share this answer
 
v2
Comments
Per Söderlund 27-Feb-13 2:04am    
You mean WCF, not WPF?
Sergey Alexandrovich Kryukov 27-Feb-13 2:06am    
Of course, I just fixed it; and thank you for this correction. I often misspell it...
—SA
Per Söderlund 27-Feb-13 2:21am    
Np.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900