/ Published in: C#
It is mandatory to implement part of and bind it to a service (using behaviorConfiguration attribut) as well as to add ''mex'' endpoint.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<system.serviceModel> <!-- some other settings --> <behaviors> <serviceBehaviors> <behavior name="Metadata"> <serviceMetadata httpGetEnabled="true" /> </behavior> </serviceBehaviors> </behaviors> <!-- some other settings --> <services> <service behaviorConfiguration="Metadata" name="Library.Service"> <endpoint address="duplex" binding="wsDualHttpBinding" contract="Library.IService" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </system.serviceModel>