【发布时间】:2012-03-19 18:21:24
【问题描述】:
我正在尝试运行一个简单的 WCF 服务...
我的 Wcf 服务 .config:
<system.serviceModel>
<services>
<service name ="WebService.Receptor">
<endpoint
address = "http://MyServer:8000/WS"
binding = "wsHttpBinding"
contract = "IMyContract"
/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
我的 Windows 服务 .config:
<system.serviceModel>
<client>
<endpoint
name = "Receptor"
address = "http://MyServer:8000/WS"
binding = "wsHttpBinding"
contract = "IMyContract"
/>
</client>
</system.serviceModel>
Obs:Wcf 服务在 Windows 7 上的 IIS 7.5 下运行。
所以,当我尝试从 wcf 代理 (IMyContract) 调用方法时,我收到了这个错误:
http://MyServer:8000/WS 上没有可以接受消息的端点监听。这通常是由不正确的地址或 SOAP 操作引起的。有关详细信息,请参阅 InnerException(如果存在)。
内部异常:
{“无法连接到远程服务器”}
有人知道为什么吗?
【问题讨论】: