query about endpoint

Posted by Gayathri under WCF on 5/10/2012 | Points: 10 | Views : 1219 | Status : [Member] | Replies : 2
<endpoint address="" binding="wsHttpBinding" contract="EvalServiceLibrary.IEvalService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

I have these type of config setup in my wcf service library.
why is the endpoint address ="" once and endpoint address ="mex"
what is mex and when do we need this exactly and when do we put address=""

kindly clarify




Responses

Posted by: Bhagwati on: 7/5/2012 [Member] Starter | Points: 25

Up
0
Down
if you will remove
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
then also your service will run but when you will run on browser it's display will be something different.
you need to put address in wsHttpBinding.

Bhagwati pal

Gayathri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pgayath on: 10/25/2012 [Member] Starter | Points: 25

Up
0
Down
You need to

.enable the service to publish metadata at all (that's the serviceMetadata behavior) - but you don't need the httpGetEnabled - that's optional

.have a place (endpoint) where an inquiring client can go grab that service metadata - that's the MEX endpoint. This is for a machine-readable format of the metadata - one that Visual Studio or svcutil can use to create a client. It's not intended for human consumption


Gayathri, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response