How do I enable/create a MEX endpoint in the below web config so I can view the service from my browser?
I have tried a few variation from googling but VS always complai
Just add System.ServiceModel.dll under references of your VS Project where your Web.config file is present.
Then add the below code in Web.config(like other service endpoints):
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange"/>
In VS, go Tools > WCF Service Configuration Editor. You can open your web.config and tinker with your WCF endpoints and bindings in a nice GUI that (shouldn't) generate XML that VS will complain about.
Add this line to the web.config right under the service endpoint:
<endpoint address="mex" binding="mexHttpBinding" name="MetadataEndpoint"
contract="IMetadataExchange" />
Thanks josh3736 for the tip on the GUI editor, the only problem I had was I still didn't know how to use the editor to do this, so here is what I did: