문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top