zoukankan      html  css  js  c++  java
  • wcf 给net.tcp 加mex

    <?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();
                }

  • 相关阅读:
    C# 文件压缩与解压(ZIP格式)
    sqlite 报 no such table 错误
    又一次的轮回
    什么是数据结构
    紧张繁忙的一周
    《编程匠艺》读书笔记之十九
    [转]软件开发者面试百问
    关于学习设计模式的一些废话
    雷人的山寨版搜索引擎
    [转]Struts 2.1发布
  • 原文地址:https://www.cnblogs.com/lijiu/p/3823079.html
Copyright © 2011-2022 走看看