Where to enable metadata (is enabled in config)?

.net, exception, mex, wcf, web-services

Solution

You need to add a metadata exchange (MEX) endpoint to your service node. Try something like this:

<endpoint 
    address="http://host/svc/mex" 
    binding="mexHttpBinding" 
    bindingConfiguration=""
    contract="IMetadataExchange"/>

Problem

I have a basic wcf service and when I go to the wcfctestclient to test it, I get an error saying metadata could not be found please add it etc. Unfortunately, the MSDN link in the error popup is broken and my WCF service's app.config has metadata enabled: ``` <serviceBehaviors> <behavior name="TelerikWcfServices.Service1Behavior"> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="True"/> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> <serviceDebug includeExceptionDetailInFaults="False" /> </behavior> </serviceBehaviors> ``` Other than that, I haven't changed any metadata settings anywhere else in my code. Where can I enable metadata to fix the error?

Original source