Hi All,
Can anyone please explain me the use and importance of IMetadataExchange in WCF ?
I have the following app.config file in which i don't use IMetadataExchange
endpoint but i am still able to create my proxy client.I have read that if i don't use IMetadataExchange
endpoint, AddServiceReference will not work because my service does not expose the metadata.
My question is, how it's working without exposing IMetadataExchange
endpoint?
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="metaDataBehavior">
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name ="WCFService.Services" behaviorConfiguration="metaDataBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8090/Services/"/>
</baseAddresses>
</host>
<endpoint address="" binding="basicHttpBinding" contract="WCFService.IMathOperations"/>
</service>
</services>
</system.serviceModel>
</configuration>