Reputation:
I have configured wcf service in IIS. my web.config is
<services>
<service name="DNExpWCFService.Service1"
behaviorConfiguration="DNExpWCFServiceBehaviour">
<endpoint name="WSGetEmployee" address="/WSGetEmployee"
binding="wsHttpBinding" contract="DNExpWCFService.IService1">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange"></endpoint>
</service>
</services>
Now when I add service reference using http://localhost:8333/Service1.svc it works fine. But for nettcpbinding I can't add service reference. I tried using net.tcp://localhost:8444/Service1.svc. But it also fails. How to add service reference using nettcpbinding?
Upvotes: 1
Views: 1307
Reputation: 523
To add service reference mex (IMetadataExchange) endpoint is used. Try to add mex endpoint with binding="mexTcpBinding"
Upvotes: 1