【问题标题】:Issues Deploying a WCF service部署 WCF 服务的问题
【发布时间】:2011-11-08 09:14:58
【问题描述】:

我们正在尝试部署一个使用 WCF 服务的网站 - 一切都在测试中正常运行 - 但是当我们通过面向外部的 IP 将其上线(指向同一个 WCF 服务)时,它停止工作。

当我们将 url 粘贴到浏览器中时,它会显示基本网页 - 但是当我们通过应用程序尝试它时,它会给我们一个错误(见下文)

配置部分 ...

<client>
  <endpoint address="http://123.321.123.321:8731/N3/WebsiteIntegrationService/" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IWebsiteIntegrationService" contract="AccessService.IWebsiteIntegrationService" name="WSHttpBinding_IWebsiteIntegrationService">
    <identity>
      <userPrincipalName value="myname@mydomain" />
      <dns value="webservername"/>
    </identity>
  </endpoint>
</client>

错误...

在 [0] 处重新抛出异常: 在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg) 在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32 类型) 在 System.ServiceModel.ICommunicationObject.Close(时间跨度超时) 在 System.ServiceModel.ClientBase1.System.ServiceModel.ICommunicationObject.Close(TimeSpan timeout) at System.ServiceModel.ClientBase1.Close() 在 System.ServiceModel.ClientBase`1.System.IDisposable.Dispose()

和..

通信对象,System.ServiceModel.Channels.ServiceChannel, 无法用于通信,因为它处于故障状态。
System.ServiceModel.CommunicationObjectFaultedException 无效 HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage)
服务器堆栈跟踪:
在 System.ServiceModel.Channels.CommunicationObject.Close(时间跨度 超时)

...但同样的服务仍在通过我们的本地测试应用程序运行 - 我们甚至可以使用面向外部的 IP。

谁能指点我正确的方向?

【问题讨论】:

  • 你能解释一下你所说的端口转发是什么意思,123.321.123.321是实际机器还是代理?您对该服务的安全配置是什么?
  • 我们已经让我们的主机打开正确的端口,所以我们不再使用端口转发 - 但我们仍然遇到问题。
  • 您是否拥有对要部署站点的服务器的 RDP 访问权限?您可以通过浏览器从那里调用服务 URL 吗?

标签: wcf deployment


【解决方案1】:

端点地址应该是安装服务的那个(即使用机器上的端口,而不是路由器的nat表中定义的外部端口)。

我在一个网络场中遇到了类似的情况,外部调用是通过 https 进行的,但在内部,负载平衡器通过 http 调用场中的实际机器。为此,服务上的所有配置设置(行为、端点)都使用 http 地址,因为这是它们被调用的方式。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多