<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <bindings>
      <netTcpBinding>
        <binding name="reliableSessionBinding">
          <reliableSession enabled="true"/>
        </binding>
      </netTcpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="exposeExceptionDetail">
          <serviceDebug includeExceptionDetailInFaults="true"/>
          <serviceMetadata httpGetEnabled="true"
                                     httpGetUrl="http://127.0.0.1:9999/filereaderservice/mex" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service name="Artech.WcfServices.Service.CalculatorService"
               behaviorConfiguration="exposeExceptionDetail">
        <endpoint address="net.tcp://127.0.0.1:3721/calculatorservice"
                  binding="netTcpBinding"
                  bindingConfiguration="reliableSessionBinding"
                  contract="Artech.WcfServices.Service.Interface.ICalculator"/>
      </service>
    </services>
  </system.serviceModel>
</configuration>

using (ServiceHost host = new ServiceHost(typeof(CalculatorService)))
            {
                host.Open();
                Console.WriteLine("OK");
                Console.Read();
            }

wcf 给net.tcp 加mex的更多相关文章

  1. WCF 采用net.tcp协议

    WCF 采用net.tcp协议实践   概述 与Socket相比,WCF真是爽得不得了,其基本指导思想为SOA——面向服务. 其基本配置在于ABC(Address,Binding,Contract), ...

  2. python模拟QQ聊天室(tcp加多线程)

    python模拟QQ聊天室(tcp加多线程) 服务器代码: from socket import * from threading import * s = socket(AF_INET,SOCK_S ...

  3. 如何在wcf中用net tcp协议进行通讯

    快速阅读 如何在wcf中用net tcp协议进行通讯,一个打开Wcf的公共类.比较好好,可以记下来. 配置文件中注意配置 Service,binding,behaviors. Service中配置en ...

  4. WCF之net.tcp

    自己通过编写WCF服务端,在客户端直接添加服务引用时发现不能引用对netTcpBinding直接引用(net.tcp://127.0.0.1:8081),所以自己找到方法了记录以备不时之需. 服务端配 ...

  5. [WCF实践]1.WCF使用net.tcp寄宿到IIS中

    一.IIS部分 环境:Windows Server 2008 R2 1.安装WAS,如下图所示:   2.网站net.tcp协议绑定,如下图所示:   3.网站启用net.tcp,如下图所示:   二 ...

  6. WCF使用net.tcp寄宿到IIS中(转)

    一.IIS部分 环境:Windows Server 2008 R2 1.安装WAS,如下图所示:   2.网站net.tcp协议绑定,如下图所示:   3.网站启用net.tcp,如下图所示:   二 ...

  7. WCF 采用net.tcp协议实践

    概述 与Socket相比,WCF真是爽得不得了,其基本指导思想为SOA——面向服务. 其基本配置在于ABC(Address,Binding,Contract),通常,只要这三个因素配置对了,那么,基本 ...

  8. WCF使用Net.tcp绑定时候出现错误:元数据包含无法解析的引用

    在WCF服务编程中,客户端添加引用服务时,出现如下错误: 元数据包含无法解析的引用:“net.tcp://192.168.1.105:1314/LoginService”. 套接字连接已中止.这可能是 ...

  9. WCF 采用net.tcp协议实践(转)

    概述 与Socket相比,WCF真是爽得不得了,其基本指导思想为SOA——面向服务. 其基本配置在于ABC(Address,Binding,Contract),通常,只要这三个因素配置对了,那么,基本 ...

随机推荐

  1. Android编译过程详解(三)

    前面两节讲解了自定义Android编译项和创建Product产品配置文件,除了编译和定义产品相关环境变量外,还需要定义Board相关环境变量. 1. build/core/config.mk 109 ...

  2. Android生命周期注意事项

                                    生命周期图解     以下英文引用全部来自google官方文档说明,方便理解. onCreate (Bundle savedInstan ...

  3. scrollview不能滚动

    1. 图片视图上不能直接滚动,需要设置交互属性为YES _contentView = [[UIImageView alloc]initWithFrame:CGRectMake(0, _headerVi ...

  4. javascript父窗口与子窗口通信

    在父窗口的js代码 //回调的函数 function alt(temp){ alert(temp); }; $("#Btn").click(function (obj) { //声 ...

  5. codeforces 340E Iahub and Permutations(错排or容斥)

    转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud Iahub and Permutations Iahub is so happy ...

  6. Hadoop2.4.1入门实例:MaxTemperature

    注意:以下内容在2.x版本与1.x版本同样适用,已在2.4.1与1.2.0进行测试. 一.前期准备 1.创建伪分布Hadoop环境,请参考官方文档.或者http://blog.csdn.net/jed ...

  7. 段的创建表user_segments

    1.段的定义及类型 Oracle中的段(segment)是占用磁盘空间的一个对象,最常见的段类型包括: l  聚簇cluster l  表table l  表分区 tablepartition l  ...

  8. Java 遍历Map

    Set<Map.Entry<String, String>> aSet = map.entrySet(); Iterator<Map.Entry<String, S ...

  9. BZOJ NOI十连测 第二测 T1

    出题人居然是个哲学家.. 26%的程序,太SB了...本来我的想法也是二分+贪心,但是贪心是个怪怪的SX贪心.. #include<algorithm> #include<cstdi ...

  10. Socket基础(一)

    OSI七层模型: 物理层:比特,数据链路层:帧,网络层:包,传输层及以上:报文.因为不用,不做详解. TCP/IP模型:这个常用,详解. 链路层:负责在两个相邻节点上线路上的无差错传输数据,以帧为单位 ...