I was wondering why do i need to declare this:
<serviceMetadata httpGetEnabled="true" />
and also this
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
If i use only the first one – it is working via browser.
so why do i need the second one ?
Can you give me example please for the situation which i’ll have to use the latter ?
You need to
enable the service to publish metadata at all (that’s the
serviceMetadatabehavior) – but you don’t need thehttpGetEnabled– that’s optionalhave 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