我爱Aspx >> Asp.Net >> Microsoft .NET Remoting:技术概述using System; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels.HTTP; namespace RemotingSamples { public class Client { public static int Main(string [] args) { HTTPChannel chan = new HTTPChannel(); ChannelServices.RegisterChannel(chan); ForwardMe param = new ForwardMe(); HelloServer obj = (HelloServer)Activator.GetObject( typeof(RemotingSamples.HelloServer), "http://localhost:8085/SayHello"); if (obj == null) System.Console.WriteLine("无法定位服务器"); else { Console.WriteLine("值为 " + param.getValue()); ForwardMe after = obj.HelloMethod(param); Console.WriteLine("呼叫后的值为 " + after.getValue()); } return 0; } } } 下面是 makefile
:all: server.exe client.exe share.dll share.dll: share.cs csc /debug+ /target:library /out:share.dll share.cs server.exe: server.cs csc /debug+ /r:share.dll /r:System.Runtime.Remoting.dll server.cs client.exe: client.cs server.exe csc /debug+ /r:share.dll /r:server.exe /r:System.Runtime.Remoting.dll client.cs clean: @del server.exe client.exe *.pdb *~ *.*~
![]() |
请以 IE4.0 以上版本 800 * 600 浏览本站
©2001 Microsoft Corporation 版权所有。保留所有权利。使用规定。
ASP.NET 入门的五个步骤[05-05]
将你的Visual Basic 6.0移植到Vi..[05-05]
利用 .NET 框架简化发布和解决 D..[05-05]
.NET新平台编程[05-05]
.NET 初 级 读 本[05-05]
Microsoft .NET vs. J2EE: How D..[05-05]
ASP.NET学习手记:验证用户表单输..[05-05]
Search的.NET版[05-05]
Microsoft .NET vs. J2EE: How D..[05-05]
ASP.NET学习手记:验证用户表单输..[05-05]
简单JSP语法[05-05]
STL知识准备: 1. C++关键字typen..[05-05]
加速ASP程序的显示速度[05-05]
声音文件格式漫谈[05-05]
VC开发应用程序答疑[05-05]
解析C语言中的sizeof[05-05]
ASP.NET 入门的五个步骤[05-05]
加快 DHTML 的一组技巧[05-05]
VB编写DirectX简明教程[05-05]
利用Dephi5编写控制面板程序[05-05]