【发布时间】: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