LYFZ.WcfSystmeService.exe.config 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?xml version="1.0"?>
  2. <configuration>
  3. <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
  4. <runtime>
  5. <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  6. <!--配置加载程序集时要查找的子目录 如:“Library;dll;bin;bin\subbin;”-->
  7. <probing privatePath="Library;dll;bin"/>
  8. </assemblyBinding>
  9. </runtime>
  10. <system.serviceModel>
  11. <services>
  12. <!--添加服务-->
  13. <service name="LYFZ.SWcfServiceLibrary.CommunicationService" behaviorConfiguration="CalculatorServiceBehavior">
  14. <!--name 必须与代码中的host实例初始化的服务一样
  15. behaviorConfiguration 行为配置-->
  16. <host>
  17. <baseAddresses>
  18. <!--添加调用服务地址-->
  19. <add baseAddress="http://localhost:8000/webService"/>
  20. </baseAddresses>
  21. </host>
  22. <!--添加契约接口 contract="LYFZ.SWcfService.ServiceContract" LYFZ.SWcfService.ServiceContract为契约接口 binding="wsHttpBinding" wsHttpBinding为通过Http调用-->
  23. <endpoint address="" binding="webHttpBinding" contract="LYFZ.SWcfServiceLibrary.ICommunication"></endpoint>
  24. <endpoint address="http://localhost:8000/ISmsService" binding="webHttpBinding" contract="LYFZ.SWcfServiceLibrary.ISmsService"></endpoint>
  25. </service>
  26. <service name="LYFZ.SWcfServiceLibrary.WsConnectService" behaviorConfiguration="WsCalculatorServiceBehavior">
  27. <!--name 必须与代码中的host实例初始化的服务一样
  28. behaviorConfiguration 行为配置-->
  29. <host>
  30. <baseAddresses>
  31. <!--添加调用服务地址-->
  32. <add baseAddress="http://localhost:8000/wsService"/>
  33. </baseAddresses>
  34. </host>
  35. <!--添加契约接口 contract="LYFZ.SWcfService.ServiceContract" LYFZ.SWcfService.ServiceContract为契约接口 binding="wsHttpBinding" wsHttpBinding为通过Http调用-->
  36. <endpoint address="" binding="wsHttpBinding" contract="LYFZ.SWcfServiceLibrary.IWsConnectService"></endpoint>
  37. </service>
  38. </services>
  39. <!--定义CalculatorServiceBehavior的行为-->
  40. <behaviors>
  41. <serviceBehaviors>
  42. <behavior name="CalculatorServiceBehavior">
  43. <serviceMetadata httpGetEnabled="true"/>
  44. <serviceDebug includeExceptionDetailInFaults="false"/>
  45. </behavior>
  46. <behavior name="WsCalculatorServiceBehavior">
  47. <serviceMetadata httpGetEnabled="true"/>
  48. <serviceDebug includeExceptionDetailInFaults="false"/>
  49. </behavior>
  50. </serviceBehaviors>
  51. </behaviors>
  52. </system.serviceModel>
  53. </configuration>