App.config 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?xml version="1.0"?>
  2. <configuration>
  3. <configSections>
  4. <section name="muchinfo.serviceModel" type="Muchinfo.Consoles.ServiceModelConfigSection, Muchinfo.ServiceClients" />
  5. </configSections>
  6. <startup>
  7. <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  8. </startup>
  9. <appSettings>
  10. <!--true:使用模拟数据, false:使用历史行情服务-->
  11. <add key="IsFakeData" value="true"/>
  12. <!--历史行情服务地址-测试用-->
  13. <add key="Quote_Address" value="192.168.30.62:4688"/>
  14. </appSettings>
  15. <system.serviceModel>
  16. <bindings>
  17. <customBinding>
  18. <!--行情组件使用-->
  19. <binding name="compactBinding">
  20. <compactMessageEncoding>
  21. <binaryMessageEncoding />
  22. </compactMessageEncoding>
  23. <tcpTransport maxBufferPoolSize="6553600" maxReceivedMessageSize="6553600"
  24. maxBufferSize="6553600" maxPendingConnections="20" maxPendingAccepts="2"
  25. listenBacklog="20">
  26. <connectionPoolSettings maxOutboundConnectionsPerEndpoint="20" />
  27. </tcpTransport>
  28. </binding>
  29. </customBinding>
  30. </bindings>
  31. <behaviors>
  32. <endpointBehaviors>
  33. <behavior name="Biz_Behavior">
  34. <dataContractSerializer ignoreExtensionDataObject="true" maxItemsInObjectGraph="6553600" />
  35. </behavior>
  36. </endpointBehaviors>
  37. </behaviors>
  38. <client>
  39. <!--行情应用服务配置(name必须为NullURL)-->
  40. <endpoint address="net.tcp://0.0.0.0" binding="customBinding" name="NullURL" bindingConfiguration="compactBinding"
  41. contract="Muchinfo.Quote.IQuoteApplicationService"/>
  42. </client>
  43. <!-- 扩展 -->
  44. <extensions>
  45. <!-- 绑定扩展 -->
  46. <bindingElementExtensions>
  47. <!-- 追加一种消息编码方式 (GZip压缩编码) -->
  48. <add name="compactMessageEncoding" type="Muchinfo.IO.Compressions.CompactMessageEncodingElement, Muchinfo.IO.Compressions"/>
  49. </bindingElementExtensions>
  50. </extensions>
  51. </system.serviceModel>
  52. </configuration>