Posted By

Neven on 02/20/12


Tagged

metadata enable WCF exchange


Versions (?)

Enable metadata exchage


 / Published in: C#
 

It is mandatory to implement part of <system.servicemodel> and bind it to a service (using behaviorConfiguration attribut) as well as to add ''mex'' endpoint.

  1. <system.serviceModel>
  2.  
  3. <!-- some other settings -->
  4.  
  5. <behaviors>
  6. <serviceBehaviors>
  7. <behavior name="Metadata">
  8. <serviceMetadata httpGetEnabled="true" />
  9. </behavior>
  10. </serviceBehaviors>
  11. </behaviors>
  12.  
  13. <!-- some other settings -->
  14.  
  15. <services>
  16. <service behaviorConfiguration="Metadata" name="Library.Service">
  17. <endpoint address="duplex" binding="wsDualHttpBinding" contract="Library.IService" />
  18. <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
  19. </service>
  20.  
  21. </system.serviceModel>

Report this snippet  

You need to login to post a comment.