WCF配置Tcp协议

时间:2014-02-08 16:45:23   收藏:0   阅读:495
注意点:
1,<serviceMetadata httpGetEnabled="false"/>  

2, 

bubuko.com,布布扣
      <services>
        <service behaviorConfiguration="MyBehavior" name="WcfService1.Service1">
          <host>
            <baseAddresses>
              <add baseAddress="net.tcp://localhost:8001/"/>
            </baseAddresses>
          </host>
          <endpoint address="S1" binding="netTcpBinding" bindingConfiguration="MyTcpBinding" contract="WcfService1.IService1"></endpoint>
          <endpoint address="S2" binding="netTcpBinding" bindingConfiguration="MyTcpBinding" contract="WcfService1.IService1"></endpoint>        
          <endpoint address="mex111" binding="mexTcpBinding" contract="IMetadataExchange" /><!--这个是必须的-->
        </service>
      </services> 
bubuko.com,布布扣

3,引用地址为:net.tcp://localhost:8001/mex111(可以右键引用的上服务修改那个地址)

4,源码下载 (后面上传)

原文:http://www.cnblogs.com/pnljs/p/3540254.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!