What is "mexHttpBinding"?

Wcf

Wcf Problem Overview


What is "mexHttpBinding" in WCF? When should this binding be used in preference to other bindings?

Wcf Solutions


Solution 1 - Wcf

It is a binding that returns metadata so you can build a proxy at the client side. See here. More here as well.

Solution 2 - Wcf

mexHTTPBinding allows to use WS-MetadataExchange over HTTP. You don't need it unless you implemented policies which may change over time and you need to discover your service with UDDI for example

Many people says it's needed for creating client side proxies. This is not true. For client side proxies you need to publish WSDL. You can do that by specifying in your service behavior.

Shortly, you don't know it -> you don't need it.

Solution 3 - Wcf

mexHttpBinding is used while adding a new Service Reference in a Project in Visual Studio 2013 (DEBUG) that will consume your WebService (providing the mexHttpBinding). After you've added the Service Reference successfully you might disable the mexHttpBinding.

It is all described in the App.config when you're creating a WCF Service Library Project in the Visual Studio 2013 ( Solution >> Add New Project >> Visual C# >> WCF >> WCF Service Library)

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionCraig SchwarzeView Question on Stackoverflow
Solution 1 - WcfOtávio DécioView Answer on Stackoverflow
Solution 2 - WcfrosencreuzView Answer on Stackoverflow
Solution 3 - WcfskyfrogView Answer on Stackoverflow