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

  • 相关阅读:
    解读express框架
    mongodb学习
    Express框架
    如何添加第三方路由进度条?
    商品删除、添加login和register组件
    商品编辑实操(上文三种方法验证)
    实现添加商品页面,并且构建路由
    与json-server对接,为组件提供CRUD API功能
    json-server学习
    jQuery核心
  • 原文地址:https://www.cnblogs.com/lijiu/p/3823079.html
Copyright © 2011-2022 走看看