Question

Is it possible to configure a WCF service (with net.tcp bindings) in such a way that it can display a help page as it shows in case of http bindings?

Was it helpful?

Solution

Add a mex endpoint to your service

<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>

Then add httpGetEnabled to the service's metadata

<serviceBehaviors>
  <behavior name="MyServiceBehavior">
   <serviceMetadata httpGetEnabled="true"/>
  </behavior>
</serviceBehaviors>

Then you should be able to browse the mex endpoint's url with http

EDIT: changed binding to mexHttpBinding instead of mexTcpBinding

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top