服务端

  1. <system.serviceModel>
  2. <services>
  3. <service name="WCF.Homedo.Service.Cache.Service">
  4. <endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpBindingConfiguration"
  5. contract="Interface.Homedo.Service.ICache" />
  6. </service>
  7. </services>
  8. <bindings>
  9. <wsHttpBinding>
  10. <binding name=" messageEncoding="Text">
  11. <readerQuotas maxDepth=" />
  12. <security mode="None"></security>
  13. </binding>
  14. </wsHttpBinding>
  15. <netTcpBinding>
  16. <binding name=" >
  17. <readerQuotas maxDepth=" />
  18. <reliableSession ordered="true" inactivityTimeout="24.00:00" enabled="true" />
  19. <security mode="None"></security>
  20. </binding>
  21. </netTcpBinding>
  22. </bindings>
  23. <behaviors>
  24. <serviceBehaviors>
  25. <behavior name="WCF.Homedo.Service.Cache.Service">
  26. <serviceMetadata httpGetEnabled="true" />
  27. <serviceDebug includeExceptionDetailInFaults="true" />
  28. </behavior>
  29. </serviceBehaviors>
  30. </behaviors>
  31. </system.serviceModel>

客户端

  1. <system.serviceModel>
  2. <bindings>
  3. <wsHttpBinding>
  4. <binding name="WSHttpBinding_IService" closeTimeout="00:00:10" openTimeout="00:00:10" receiveTimeout="00.01:00" sendTimeout="00:01:00"
  5. bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
  6. maxBufferPoolSize="
  7. messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
  8. allowCookies="false">
  9. <readerQuotas maxDepth="
  10. maxBytesPerRead=" />
  11. <reliableSession ordered="true" inactivityTimeout="00:10:00"
  12. enabled="false" />
  13. <security mode="None">
  14. <transport clientCredentialType="Windows" proxyCredentialType="None"
  15. realm="" />
  16. <message clientCredentialType="Windows" negotiateServiceCredential="true"
  17. algorithmSuite="Default" />
  18. </security>
  19. </binding>
  20. </wsHttpBinding>
  21. <netTcpBinding>
  22. <binding name="NetTcpBinding_IService" closeTimeout="00:00:10" openTimeout="00:00:10" receiveTimeout="00.01:00" sendTimeout="00:01:00"
  23. transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
  24. hostNameComparisonMode="
  25. maxBufferPoolSize="
  26. maxReceivedMessageSize=">
  27. <readerQuotas maxDepth="
  28. maxBytesPerRead=" />
  29. <reliableSession ordered="true" inactivityTimeout="24.00:00"
  30. enabled="true" />
  31. <security mode="None">
  32. <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
  33. <message clientCredentialType="Windows" />
  34. </security>
  35. </binding>
  36. </netTcpBinding>
  37. </bindings>
  38. <client>
  39. <!--<endpoint address="net.tcp://172.16.220.196:10805/Service.svc" binding="netTcpBinding"
  40. bindingConfiguration="NetTcpBinding_IService" contract="Interface.Homedo.Service.ICache" name="cacheservice1"/>
  41. <endpoint address="net.tcp://172.16.220.196:10806/Service.svc" binding="netTcpBinding"
  42. bindingConfiguration="NetTcpBinding_IService" contract="Interface.Homedo.Service.ICache" name="cacheservice2"/>
  43. <endpoint address="net.tcp://172.16.220.196:10807/Service.svc" binding="netTcpBinding"
  44. bindingConfiguration="NetTcpBinding_IService" contract="Interface.Homedo.Service.ICache" name="cacheservice3"/>-->
  45. <endpoint address="http://172.16.220.196:10605/Service.svc" binding="wsHttpBinding"
  46. bindingConfiguration="WSHttpBinding_IService" contract="Interface.Homedo.Service.ICache" name="cacheservice1"/>
  47. <endpoint address="http://172.16.220.196:10606/Service.svc" binding="wsHttpBinding"
  48. bindingConfiguration="WSHttpBinding_IService" contract="Interface.Homedo.Service.ICache" name="cacheservice2"/>
  49. <endpoint address="net.tcp://172.16.220.196:10807/Service.svc" binding="netTcpBinding"
  50. bindingConfiguration="NetTcpBinding_IService" contract="Interface.Homedo.Service.ICache" name="cacheservice3"/>
  51. </client>
  52. </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. UE4 材质切换(带动画效果)

    先看效果图:小木块掉到地板上(小木块本身会消失掉),地板就开始了动效材质切换.引擎版本用的是4.11.2 方法步骤: 首先在UE4内容浏览器中新建一个材质. 第一步要实现一个扫光的效果,如下图. 实现 ...

  2. Javascript中的数组方法总结

    1.concat():将两个或多个数组合并成一个数组 arrayObject.concat(arrayX,arrayX,......,arrayX),返回一个新的数据,arrayX可以是数值也可以是数 ...

  3. 粗略了解struts2

    花了半天的时间再把struts2详细拟了一遍,之前用习惯了servlet加jsp,再看struts2的时候终于明白为什么大家都愿意学,以人类天生的惰性,要让他们愿意去学习一个新的东西,这东西一定可以让 ...

  4. js 事件冒泡

    一. 什么是事件的冒泡:      在一个对象上触发某类事件(比如单击onclick事件),如果此对象定义了此事件的处理程序,那么此事件就会调用这个程序,如果没有定义此事件处理程序或者事件返回true ...

  5. Flex 利用Space控制进行组件的右对齐

    Spacer 控件可帮助您布置父容器中的子项.虽然 Spacer 控件不会绘制任何内容,但它会在父容器中为其本身分配空间. 在以下示例中,使用灵活的 Spacer 控件将 Button 控件推到右侧, ...

  6. 如何修改WAMP中mysql默认空密码

      WAMP安装好后,mysql密码是为空的,那么要如何修改呢?其实很简单,通过几条指令就行了,下面我就一步步来操作. 首先,通过WAMP打开mysql控制台. 提示输入密码,因为现在是空,所以直接按 ...

  7. Google Java编程风格指南

    出处:http://hawstein.com/posts/google-java-style.html 声明:本文采用以下协议进行授权: 自由转载-非商用-非衍生-保持署名|Creative Comm ...

  8. php $_SERVER中的SERVER_NAME 和HTTP_HOST的区别

    关于这个问题,搜索引擎上搜到一大片的文章,有很多问题,在这找到一篇正确的说法:http://mimiz.cn/index.php/php/php-http_host-server_name-diffe ...

  9. 查看旧版jexus命令

    查看jexus版本 curl http://localhost/info

  10. WPF-流文档元素

    1.Block元素 用于分组其他元素 Paragraph是块级别元素,文本段落 Paragraph.Inlines集合内. 设置第一行缩进量Paragraph.TextIndet 2.Inline元素 ...