简体   繁体   中英

How to add service reference in visual studio with nettcpbinding hosted in IIS?

在此处输入图片说明

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?

To add service reference mex (IMetadataExchange) endpoint is used. Try to add mex endpoint with binding="mexTcpBinding"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM