服务端

<system.serviceModel>
    <services>
      <service name="WCF.Homedo.Service.Cache.Service">
        <endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpBindingConfiguration"
            contract="Interface.Homedo.Service.ICache" />
      </service>
    </services>
    <bindings>
      <wsHttpBinding>
        <binding name=" messageEncoding="Text">
          <readerQuotas maxDepth=" />
          <security mode="None"></security>
        </binding>
      </wsHttpBinding>
      <netTcpBinding>
        <binding name="  >
          <readerQuotas maxDepth=" />
          <reliableSession ordered="true" inactivityTimeout="24.00:00" enabled="true" />
          <security mode="None"></security>
        </binding>
      </netTcpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="WCF.Homedo.Service.Cache.Service">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

客户端

<system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_IService" closeTimeout="00:00:10" openTimeout="00:00:10" receiveTimeout="00.01:00" sendTimeout="00:01:00"
            bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
            maxBufferPoolSize="
            messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
            allowCookies="false">
          <readerQuotas maxDepth="
              maxBytesPerRead=" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00"
              enabled="false" />
          <security mode="None">
            <transport clientCredentialType="Windows" proxyCredentialType="None"
                realm="" />
            <message clientCredentialType="Windows" negotiateServiceCredential="true"
                algorithmSuite="Default" />
          </security>
        </binding>
      </wsHttpBinding>
      <netTcpBinding>
        <binding name="NetTcpBinding_IService" closeTimeout="00:00:10" openTimeout="00:00:10" receiveTimeout="00.01:00" sendTimeout="00:01:00"
            transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
            hostNameComparisonMode="
            maxBufferPoolSize="
            maxReceivedMessageSize=">
          <readerQuotas maxDepth="
              maxBytesPerRead=" />
          <reliableSession ordered="true" inactivityTimeout="24.00:00"
              enabled="true" />
          <security mode="None">
            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
            <message clientCredentialType="Windows" />
          </security>
        </binding>
      </netTcpBinding>
    </bindings>
    <client>
      <!--<endpoint address="net.tcp://172.16.220.196:10805/Service.svc" binding="netTcpBinding"
                bindingConfiguration="NetTcpBinding_IService" contract="Interface.Homedo.Service.ICache" name="cacheservice1"/>
      <endpoint address="net.tcp://172.16.220.196:10806/Service.svc" binding="netTcpBinding"
                bindingConfiguration="NetTcpBinding_IService" contract="Interface.Homedo.Service.ICache" name="cacheservice2"/>
      <endpoint address="net.tcp://172.16.220.196:10807/Service.svc" binding="netTcpBinding"
                bindingConfiguration="NetTcpBinding_IService" contract="Interface.Homedo.Service.ICache" name="cacheservice3"/>-->
      <endpoint address="http://172.16.220.196:10605/Service.svc" binding="wsHttpBinding"
                bindingConfiguration="WSHttpBinding_IService" contract="Interface.Homedo.Service.ICache" name="cacheservice1"/>
      <endpoint address="http://172.16.220.196:10606/Service.svc" binding="wsHttpBinding"
                bindingConfiguration="WSHttpBinding_IService" contract="Interface.Homedo.Service.ICache" name="cacheservice2"/>
      <endpoint address="net.tcp://172.16.220.196:10807/Service.svc" binding="netTcpBinding"
                bindingConfiguration="NetTcpBinding_IService" contract="Interface.Homedo.Service.ICache" name="cacheservice3"/>
    </client>
  </system.serviceModel>

WCF配置的更多相关文章

  1. WCF学习第二篇:WCF 配置架构。这有助于对wcf配置的理解和记忆

    使用 Windows Communication Foundation (WCF) 配置元素,您可以配置 WCF 服务和客户端应用程序. 可以使用配置编辑器工具 (SvcConfigEditor.ex ...

  2. WCF配置详解

    前面一篇文章<WCF 学习总结1 -- 简单实例> 一股脑儿展示了几种WCF部署方式,其中配置文件(App.config/Web.config)都是IDE自动生成,省去了我们不少功夫.现在 ...

  3. 编写WCF服务时右击配置文件无“Edit WCF Configuration”(编辑 WCF 配置)远程的解决办法

    原文:编写WCF服务时右击配置文件无“Edit WCF Configuration”远程的解决办法 今天在看<WCF揭秘>书中看到作者提出可以在一个WCF Host应用程序的App.Con ...

  4. WCF 4.0 如何编程修改wcf配置,不使用web.config静态配置

    How to programmatically modify WCF without web.config setting WCF 4.0 如何编程修改wcf配置,不使用web.config静态配置 ...

  5. WCF配置与服务寄宿

    1.项目框架如下: 2.WCF服务项目 其中WCFService中存放服务契约及其实现,需添加命名空间:System.ServiceModel 3.服务寄宿 WCFHost是一个控制台程序,用于寄宿W ...

  6. 高并发WCF配置

    在使用WCF做服务接口时,TCP模式肯定比Http效率高,Binary/MTOM格式的绑定也会Text格式的绑定高效. 两个endpoint,一个用来调试:ms-mex的binding是用来方便WCF ...

  7. WCF配置工具及服务调试工具

      配置工具 C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\SvcConfigEditor.exe WCF调试客户端工具 C:\Program F ...

  8. WCF 配置终结点并调用服务

    wcf通过xml文件配置终结点什么的感觉有点小麻烦,个人还是觉得用代码形式配置比较好,当然在发布的时候可能会比较麻烦,需要重新编译... 下面将wcf service寄宿在控制台应用程序中并配置终结点 ...

  9. WCF 配置服务 (02)

    配置服务概述 • 在设计和实现服务协定后,即可配置服务. 在其中可以定义和自定义如何向客户端公开服务,包括指定可以找到服务的地址.服务用于发送和接收消息的传输和消息编码,以及服务需要的安全类型. • ...

  10. wcf 配置总结

    最近在配置WCF的时候,需要一点麻烦,避免以后才出现错误,特记录起来 1.wcf需要使用用户名和X509证书验证 A.服务器的config配置 a.bindings/binding中使用 <se ...

随机推荐

  1. linux下JDK1.7安装

    http://mnt.conf.blog.163.com/blog/static/115668258201210793915876/ 一.软件下载1.下载JDK(下面分别是32位系统和64位系统下的版 ...

  2. 1-Spark高级数据分析-第一章 大数据分析

    1.1 数据科学面临的挑战 第一,成功的分析中绝大部分工作是数据预处理. 第二,迭代与数据科学紧密相关.建模和分析经常需要对一个数据集进行多次遍历.这其中一方面是由机器学习算法和统计过程本身造成的. ...

  3. java hook

    linux下 hook的触发,需要 发送信号为15. 后续补充具体内容.

  4. 2015.10.15night

    #include<stdio.h> main() { int x,y; scanf("%d",&x); if(x>0)y=1; else {if(x< ...

  5. windows 7 右下角登陆信息去除

    ---恢复内容开始--- 开始--运行中输入regedit 找到注册表键值HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NlaSvc\Par ...

  6. swift开源项目精选

    Swift 开源项目精选-v1.0 2016-03-07 22:11 542人阅读 评论(0) 收藏 举报  分类: iOS(55)   Swift(4)    目录(?)[+]   转自 http: ...

  7. HDU 5937 Equation

    题意: 有1~9数字各有a1, a2, -, a9个, 有无穷多的+和=. 问只用这些数字, 最多能组成多少个不同的等式x+y=z, 其中x,y,z∈[1,9]. 等式中只要有一个数字不一样 就是不一 ...

  8. Lua Serial/Serialize/Serializer/Serializing 序列化/反序列化

    第一篇 有点内容的.. 支持 表/函数/数值/布尔/字符串 做 键.值 支持 循环/嵌套 支持 元表(支持弱表分析) 支持 表被任意数量.位置引用 支持 扩展引用外部 支持 格式化输出 支持 嵌套优化 ...

  9. 开始使用Pyhton

    安装 第一个Python程序 首先我们打开python 交互式解释器, 执行如下命令: Python 3.5.1+ (default, Mar 30 2016, 22:46:26) [GCC 5.3. ...

  10. windows7 阻止copyfile到windows目录的解决办法

    一. windows7 x64,uac会阻止copyfile到c:/windows.提示拒绝访问. [会引起uac提示的3种情况: Administrator access token checks. ...