最简WCF服务器端配置文件

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了最简WCF服务器端配置文件相关的知识,希望对你有一定的参考价值。

ABC - Address Binding Contract
Note that the Service Name and Contract must match a real live type (case Sensitive)
Binding name is also case sensitive.
  1. <system.serviceModel>
  2. <services>
  3. <service name="WCFServiceStuff.DoStuffImpl">
  4. <endpoint address="net.tcp://localhost:8001"
  5. binding="netTcpBinding"
  6. contract="WCFServiceStuff.IDoStuff" />
  7. </service>
  8. </services>
  9. </system.serviceModel>
  10.  
  11.  
  12. With MetaData added
  13.  
  14. <system.serviceModel>
  15. <services>
  16. <service name="WCFServiceStuff.DoStuffImpl"
  17. behaviorConfiguration="mex">
  18. <endpoint address="net.tcp://localhost:8001"
  19. binding="netTcpBinding"
  20. contract="WCFServiceStuff.IDoStuff" />
  21. <endpoint address="net.tcp://localhost:8001/mex"
  22. binding="mexTcpBinding"
  23. contract="IMetadataExchange" />
  24. </service>
  25. </services>
  26. <behaviors>
  27. <serviceBehaviors>
  28. <behavior name="mex">
  29. <serviceMetadata/>
  30. </behavior>
  31. </serviceBehaviors>
  32. </behaviors>
  33. </system.serviceModel>

以上是关于最简WCF服务器端配置文件的主要内容,如果未能解决你的问题,请参考以下文章

WCF系列教程之WCF服务配置

WCF 相关配置

WCF入门二[WCF的配置文件]

[转]使用代码去描述WCF配置文件

WCF 大文件传输配置

2 WCF里面配置的含义