码迷,mamicode.com
首页 > Web开发 > 详细

wcf 给net.tcp 加mex

时间:2014-07-05 16:49:41      阅读:244      评论:0      收藏:0      [点我收藏+]

标签:http   os   art   io   line   new   

<?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,布布扣,bubuko.com

wcf 给net.tcp 加mex

标签:http   os   art   io   line   new   

原文地址:http://www.cnblogs.com/lijiu/p/3823079.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!