You also need to create a metadata exchange endpoint. This special endpoint can append mex to the HTTP address the service uses. The endpoint should use the IMetadataExchange interface as the contract and mexHttpBinding as the binding.
<system.serviceModel>
<services>
<service name="Service" behaviorConfiguration="ServiceBehavior">
<endpoint address="http://localhost:50187/WCFService1/" binding="wsHttpBinding" contract="IService"></endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
No comments:
Post a Comment