Approach One
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:8000/Mex" />
</behavior>
</serviceBehaviors>
</behaviors>
Approach Two
<services>
<service name="Service.Service" behaviorConfiguration="mexServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000"/>
</baseAddresses>
</host>
<endpoint address="WCFMyAsynService" binding="basicHttpBinding"
bindingConfiguration="" contract="Service.IService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"
bindingConfiguration="" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="mexServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
Approach Three
ServiceMetadataBehavior behavior = new ServiceMetadataBehavior();
behavior.HttpGetEnabled = true;
svcHost.Description.Behaviors.Add(behavior);
svcHost.AddServiceEndpoint(
typeof(IMetadataExchange),
MetadataExchangeBindings.CreateMexHttpBinding(),
"mex");
+
<services>
<service name="Service.Service">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000"/>
</baseAddresses>
</host>
<endpoint address="http://localhost:8000/WCFMyAsynService" binding="basicHttpBinding"
bindingConfiguration="" contract="Service.IService" />
</service>
</services>