TCP / IP或.Net Remoting [英] TCP/IP or .Net Remoting

查看:59
本文介绍了TCP / IP或.Net Remoting的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我想从我的Windows .net应用程序连接Linux服务器。

那么哪种方式更好?

我必须使用 TcpClient 或者我必须使用 .Net Remoting

任何人都可以帮帮我???



谢谢,

Viprat

解决方案

Hi Viprat,





1).NET Remoting只有在两个部分都安装了.NET框架时才能工作。



2)如果在两台服务器上都安装了.NET框架,我建议使用带有net.tcp协议的WCF。这是.NET中通信的最佳解决方案,可提供高安全性和最高速度。



3)TCP更加灵活;您可以通过使用套接字(通过使用不同的技术Java和.NET在两个部分中实现)将Linux服务器与Java中的应用程序联系起来,该应用程序通过Windows与您的.NET应用程序通信。它还为您提供最高速度,但您应该实现自己的通信协议。如果你想增加安全性,你也可以添加SSL。



PS:在一些旧项目中我使用过解决方案1.和3.但是从2010年开始我使用只有WCF和net.tcp用于.NET应用程序之间的通信。



最好的问候,

Raul


< blockquote>这是一个完全不正确的问题。在定义谓词更好之前你不能合理地问这样的事情,但是你可以吗?



此外,你不能只使用 TpcClient 。你只能使用 TcpClient + TcpListener



你在这里得不到帮助,但我建议:你需要使用两者,加上WCF。只有这样,您才能合理地评估FCL的哪个部分对于一个或另一个项目更好。只有熟悉你的项目的人才能给你一个合理的建议。



还有一个建议:很多人说:远程处理已经过时,应该总是用WCF替换。我不同意。我遇到了更棘手的情况,其中更多的灵活性是重要的,并且远程处理更好。使用远程处理,您可以自己动手,这通常(但并不总是)意味着更多的灵活性。同样,这一切都取决于您的项目,目标和要求。



-SA


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

解决方案

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


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


这篇关于TCP / IP或.Net Remoting的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆