Enable metadata exchage


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

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


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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.