简体   繁体   English

使用netTcpBinding无法访问服务?

[英]Service is not accessible using netTcpBinding?

This is the configuration file while hosting the service, here i hosted service using ip 127.0.0.1:36345, here service is not accessible using netTcpBinding when i hosted the using the exact ip of server (192.168.1.47:36345) it works.. 这是托管服务时的配置文件,这里我使用ip 127.0.0.1:36345托管了服务,当我使用服务器的正确IP(192.168.1.47:36345)托管时,无法使用netTcpBinding访问此服务。

what could be possible reason and solution? 有什么可能的原因和解决方案?

<services>
      <service behaviorConfiguration="metadataSupport" name="WCFSvc.WCFService">
        <endpoint binding="wsDualHttpBinding" bindingConfiguration="wsDualHttp"
           contract="WCFSvc.IWCFService" />
        <endpoint binding="netTcpBinding" bindingConfiguration="netTcp"
           contract="WCFSvc.IWCFService" />
        <endpoint binding="netNamedPipeBinding" contract="WCFSvc.IWCFService" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://127.0.0.1:26345/WCFSvc" />
            <add baseAddress="net.tcp://127.0.0.1:36345/WCFSvc" />
            <add baseAddress="net.pipe://localhost/DataService/Service.svc" />
          </baseAddresses>
        </host>
      </service>
</services>

Could be several things, here are a few that you could try: 可能有几件事,您可以尝试以下几件事:

  • Is there any local firewall on the machine blocking the request? 机器上是否有任何阻止请求的本地防火墙?
  • Is there a confilct with the net.pipe configuration? net.pipe配置是否有冲突?
  • Is there something in the binding configuration that could be causing the problem? 绑定配置中是否有可能导致此问题的内容?

What error are you getting? 你遇到了什么错误? Is there any error being written to the eventlog? 是否将任何错误写入事件日志?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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