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

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

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

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();
     }
  }
}
输出将显示如下。

Sum of two number 5.6
11

联系我们

邮箱 626512443@qq.com
电话 18611320371(微信)
QQ群 235681453

Copyright © 2015-2022

备案号:京ICP备15003423号-3