Minimalist WCF Server-side Config File


/ Published in: C#
Save to your folder(s)

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.


Copy this code and paste it in your HTML
  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>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.