[英]How to add service reference in visual studio with nettcpbinding hosted in IIS?
I have configured wcf service in IIS. 我已经在IIS中配置了wcf服务。 my web.config is 我的web.config是
<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. 现在,当我使用http:// localhost:8333 / Service1.svc添加服务引用时,它可以正常工作。 But for nettcpbinding I can't add service reference. 但是对于nettcpbinding,我无法添加服务引用。 I tried using net.tcp://localhost:8444/Service1.svc. 我尝试使用net.tcp:// localhost:8444 / Service1.svc。 But it also fails. 但是它也失败了。 How to add service reference using nettcpbinding? 如何使用nettcpbinding添加服务引用?
To add service reference mex (IMetadataExchange) endpoint is used. 要添加服务参考,请使用mex(IMetadataExchange)端点。 Try to add mex endpoint with binding="mexTcpBinding" 尝试使用binding =“ mexTcpBinding”添加mex端点
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.