摘要: View Code staticvoid Main(string[] args) { Console.WriteLine("请输入num1,num2"); int num1 = Convert.ToInt32(Console.ReadLine()); int num2 = Convert.ToInt32(Console.ReadLine()); //获取计算加法服务 MySumServiceMex.WcfServiceClient sum =new client2.MyS... 阅读全文
posted @ 2011-04-28 15:34 高兴happy 阅读(362) 评论(0) 推荐(0) 编辑
摘要: wcf传输地址分为HTTP,TCP,Peer network(对等网)和MSMQ地址通常采用的格式为:[基地址]/[可选的URL]基地址通常的格式为;[传输协议]://[机器名或者域名][:可选端口]可以讲地址http://localhost:8001读作:"采用HTTP协议访问loaclhost机器,并在8001端口等待调用"如果URL为http://localhost:8001/MyService,则读作“采用HTTP协议访问localhost机器。MyService服务在端口8001等待调用”简单例子如下:添加wcf文件DService1添加using System. 阅读全文
posted @ 2011-04-28 15:14 高兴happy 阅读(337) 评论(0) 推荐(0) 编辑