【发布时间】:2015-06-23 13:44:17
【问题描述】:
我正在使用 PowerShell 访问 WCF SOAP 服务。这一切都是直接在 WCF 端点主机上进行的。我正在使用:
$request = New-WebServiceProxy -uri ${using:endpoint}"?wsdl" -class "MyService" -namespace "MS"
我有一台位于 F5 本地流量管理器 (LTM) 后面的新服务器。当我尝试同样的事情时,我收到了错误,因为返回的 WSDL 包含到服务器本身的链接,这是不可访问的,而不是到 LTM 端点的链接。
这会导致:
The document was understood, but it could not be processed.
- The WSDL document contains links that could not be resolved.
- There was an error downloading 'http://myhost/MyService/MyService.svc?xsd=xsd0'.
- Unable to connect to the remote server
- No connection could be made because the target machine actively refused it 192.168.1.1:80
+ CategoryInfo : InvalidOperation: (http://192.168.1...ervice.svc?wsdl:Uri) [New-WebServiceProxy], Invalid
OperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.NewWebServiceProxy
+ PSComputerName : localhost
我需要什么才能让 LTM 主机/IP 出现在 WSDL 中?我缺少服务的 web.config 中的某些设置吗?
【问题讨论】:
-
我认为这更多是 F5 LTM 和 DNS 设置的问题。您的应用/服务应该有一个 DNS 名称。 web.config 应该引用 DNS 名称,然后 F5 LTM 使用此 DNS 名称进行负载平衡。
-
好的。我希望我可以在不设置 DNS 条目的情况下(还)做到这一点,因为我需要在运行环境中对其进行测试,然后再将现有的 DNS 别名转移到 VIP。情况似乎并非如此。设置 DNS 并为网站正确绑定似乎已经成功了。
标签: wcf powershell soap wsdl f5