摘要:
1、svcutil.exe工具创建客户端代理类 打开Visual Studio命令提示 svcutil.exe /out:c:\ClientCode.cs /config:c:\app.config http://localhost:8000/Services/service.svc2、代码编写基础通道创建客户端代理类EndpointAddress address = new EndpointAddress("http://localhost/servicemodelsamples/service.svc"); WSHttpBinding binding = new WS. 阅读全文
posted @ 2012-05-02 14:38
王宏磊@中国
阅读(294)
评论(0)
推荐(0)
摘要:
EndpointAddress address = new EndpointAddress("http://localhost/servicemodelsamples/service.svc"); WSHttpBinding binding = new WSHttpBinding(); ChannelFactory<ICalculator> factory = new ChannelFactory<ICalculator>(binding, address); ICalculator channel = factory.Cre... 阅读全文
posted @ 2012-05-02 14:22
王宏磊@中国
阅读(433)
评论(0)
推荐(0)
摘要:
一、在IIS中承载 请确保正确安装和注册IIS和WCF以及WCF HTTP激活组件。 二、在Windows进程激活服务(WAS)中承载 三、在托管应用程序中承载(自承载) using (ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService))) { serviceHost.Open(); Console.WriteLine("The service is ready."); Cons... 阅读全文
posted @ 2012-05-02 13:41
王宏磊@中国
阅读(182)
评论(0)
推荐(0)
浙公网安备 33010602011771号