Reputation: 95
given this configuration :
<service name="WCFWSHttps.Service1" behaviorConfiguration="WCFWSHttps.Service1Behavior">
<endpoint address="https://localhost/WCFWSHttps/Service1.svc" binding="wsHttpBinding" bindingConfiguration="TransportSecurity" contract="WCFWSHttps.IService1"/>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
what is <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
used for?
and how can i implement this enpoint in code behind. ie i have
WSHttpBinding binding;
ServiceHost svh
how can i add the mex thingi in code behind?
Upvotes: 0
Views: 292
Reputation: 14555
this shows how to AddServiceEndpoint to your ServiceHost in code behind.
Upvotes: 1
Reputation: 405
Imetadataexchange interface exposes methods to return the metadata information about the service like the method definition, data types of the return type etc. Basically metadata will be Web Services Description Language (WSDL) and helps the client to consume the service which you have exposed.
So there is no need to implement them and they are inbuilt in WCF.
You can find more info about the interfacte in here IMetadataExchange
Upvotes: 2