NET Remoting 不同应用程序域之间通信的技术
使用.NET Remoting 在不同应用程序域之间通信可以在同一个进程中、一个系统的进程之间或不同系统的进程之间进行
NET Remoting is a technology for communication between different application domains.
Using .NET Remoting for communication between application domains can happen inside the same process, between processes on a single system, or between processes on different systems.
对于客户端和服务器应用程序之间的通信,可以使用几种不同的技术
1.可以使用Socket API编写应用程序,或使用System.Net 名称空间中的一些辅助类,便于处理协议、IP 地址和端口号。使用这种技术总是必须通过网络发送数据。所发送的数据可以是自己的自定义协议,其中由服务器解释数据包,这样服务器就知道应调用什么方法。我们不仅需要处理发送的数据,还需要自己创建线程。
2.使用ASP.NET Web 服务,可以跨网络传递消息。通过ASP.NET Web 服务,可以获得平台独立性。ASP.NET Web 服务不仅具有平台独立性,在客户端和服务器之间的耦合也比较松散,于是更容易处理版本问题。
3.NET Remoting 总是在客户端和服务器之间提供较紧密的耦合,因为它们共享相同的对象类型。.NET Remoting 给CLR 对象提供了跨不同应用程序域调用方法的功能。
Several different technologies can be used for communication with a client and a server application.
You can program your application by using sockets, or you can use some helper classes from the System.Net namespace that make it easier to deal with protocols, IP addresses, and port numbers . Using this technology, you always have to send data across the network.The data you send can be your own custom protocol where the packet is interpreted by the server, so that the server knows what methods should be invoked. You not only have to deal with the data that is sent but also have to create threads yourself.
Using ASP.NET Web services, you can send messages across the network. With ASP.NET Web services you get platform independence. You also get a loose coupling between client and server, which means that it ’ s easier to deal with versioning issues.
With .NET Remoting you always have a tight coupling between client and server, because the same object types are shared. .NET Remoting brings CLR object functionality to methods that are invoked across different application domains.