消费WCF服务托管在Windows激活服务

消费中承载WAS是一个简单的办法,只涉及几个步骤来清楚说明如下WCF服务。在这里,看看下面来了解这个概念。

代理类和配置文件添加到客户端应用程序。创建MathServiceClient对象,并调用该方法。

Consuming WCF hosted in WAS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespaceWASHostedClient
{
  classProgram
  {
     staticvoid Main(string[] args)
     {
        MathServiceClient client = newMathServiceClient();
        Console.WriteLine("Sum of two number 5,6");
        Console.WriteLine(client.Add(5, 6));
        Console.ReadLine();
     }
  }
}

输出将显示如下。

Consuming WCF hosted in WAS

上一篇: 自托管消费WCF服务 下一篇: 消费WCF服务托管在Windows服务