【问题标题】:"No Endpoint Listening" in WCF Service Hosted in Windows ServiceWindows 服务中托管的 WCF 服务中的“无终结点侦听”
【发布时间】:2012-02-13 22:03:03
【问题描述】:

我有由 Windows 服务托管的 WCF 服务。

这是我的 app.config 文件(服务器端)

<configuration>
    <system.serviceModel>
        <services>
            <service name="Service.WebexClient"  behaviorConfiguration="MyServiceTypeBehaviors" >
                <host>
                    <baseAddresses>
                        <add baseAddress="http://192.168.0.101:8413/MyWebexService"/>
                    </baseAddresses>
                </host>
            </service>

        </services>
        <behaviors>
            <serviceBehaviors>
                <behavior name="MyServiceTypeBehaviors" >
                    <serviceMetadata httpGetEnabled="true"  httpGetUrl="http://192.168.0.101:8413/MyWebexService/Help"/>
                </behavior>
            </serviceBehaviors>
        </behaviors>
    </system.serviceModel>
</configuration>

所以我在网络上的另一台 PC 上尝试添加服务引用,我得到了上面的 Arror:

尝试查找“http://192.168.0.101:8413/MyWebexService/help”服务时发生错误(详细信息)

详情:

下载“http://192.168.0.101:8413/MyWebexService/help”时出错。 无法连接到远程服务器 连接尝试失败,因为连接的一方在一段时间后没有正确响应,或者连接失败,因为连接的主机没有响应 192.168.0.101:8413 元数据包含无法解析的引用:“http://192.168.0.101:8413/MyWebexService/help”。 在http://192.168.0.101:8413/MyWebexService/help 处没有可以接受消息的端点监听。这通常是由不正确的地址或 SOAP 操作引起的。有关更多详细信息,请参阅 InnerException(如果存在)。 无法连接到远程服务器 连接尝试失败,因为连接的一方在一段时间后没有正确响应,或者连接失败,因为连接的主机没有响应 192.168.0.101:8413 如果在当前解决方案中定义了服务,请尝试构建解决方案并再次添加服务引用。

服务已启动,我设法从托管 PC 访问它

【问题讨论】:

  • 请与我们分享详细信息。我们想知道。

标签: c# wcf web-services service-reference


【解决方案1】:

如果您可以从托管 PC 访问该服务,但不能从其他 PC 访问,则可能是防火墙或 Internet 代理存在问题。

你能从远程 PC ping 服务的 IP 地址吗?

【讨论】:

  • 我从主机 ping 到客户端,但我无法从客户端 ping 到主机
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-01-13
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多