Search This Blog

Friday, December 9, 2011

Difference between Mex and Http Get in WCF

Question
In Wcf What is deference between

mex and http get



<serviceMetadata httpGetEnabled="true"/> and
Mex end point(example like <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>)

Which one is best.
When i need to use mex.

Please let me know any queries from your side.

Answer

It appears you are trying to develop using WCF without trying to know much about WCF.

httpGetEnabled = true indicates whether to publish service metadata for retrieval using an HTTP/GET request.  Is used to enable metadata support for HTTP/GET and WS-Transfer/GET requests.


The Mex endpoint is significant if you want to use WS-MetadataExchange instead of WSDL to grab the service metadata.

You can enable one or the other, or both. It is based on your requirement.

One of the best use with httpGetEnabled is with RESTful WCF Services.

Hope that helps..

More references

No comments:

Post a Comment