使用netTcpBinding无法访问服务?

时间:2009-09-10 08:40:51

标签: c# .net wcf wcf-binding

这是托管服务时的配置文件,这里我使用ip 127.0.0.1:36345托管服务,这里使用netTcpBinding无法访问服务 当我主持使用服务器的确切IP(192.168.1.47:36345)时它工作..

可能的原因和解决方案是什么?

<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>

1 个答案:

答案 0 :(得分:0)

可能有几件事,这里有一些你可以尝试的事情:

  • 机器上是否有阻止请求的本地防火墙?
  • net.pipe配置是否存在混淆?
  • 绑定配置中是否存在可能导致问题的内容?

你得到什么错误?是否有任何错误写入事件日志?