【发布时间】:2015-11-19 06:51:10
【问题描述】:
以下是场景。
我们有 F5 负载均衡器,传入的请求以 HTTP 的形式进入 F5 负载均衡器,然后它们以 HTTP 的形式重定向到 WCF 服务服务器。
我已经尝试了几乎所有可能的配置组合,但它总是给出两个不同的错误。例如,根据一些建议,我尝试将安全模式更改为“传输”,然后错误变为如下:“无法为 SSL/TLS 建立安全通道,权限为 'xxx.xxx.xxx.xxx:XXXX' 。”
服务器配置:
<system.serviceModel>
<services>
<service behaviorConfiguration="NameofServiceBehaviour" name="NameOfServices">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpEndPointBinding" name="wsHttpEndPoint" contract="Name.IContractName" />
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="wsHttpEndPointBinding">
<security mode="None">
<!-- <transport clientCredentialType="Certificate" /> -->
</security>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehaviourName">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
<!-- <serviceCredentials>
<serviceCertificate findValue="CN=CertificateName" storeLocation="LocalMachine" />
</serviceCredentials> -->
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
</system.serviceModel>
客户端配置:
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsHttpEndPoint">
<security mode="None" />
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="https://URL.svc"
binding="wsHttpBinding" bindingConfiguration="wsHttpEndPoint"
contract="Name.IContractName" name="wsHttpEndPoint" />
</client>
</system.serviceModel>
问候, 纳西尔
【问题讨论】:
-
在这个链接中抢夺,它可以帮助你:codeproject.com/Articles/36705/…
-
Ricardo - 此链接仅在不涉及负载平衡器的情况下有效。我试过这个。如果我删除负载均衡器并直接调用我的 WCF 服务器,那么它工作正常。但是使用负载均衡器就不行了。
-
如果您的负载均衡器配置为卸载 SSL,并且负载均衡器和您的 WCF 服务(托管服务器)之间的流量通过 http,您可以将绑定更改为 basichttp。对于这种情况,您不需要 wshttpbindingbinding。
标签: wcf https wcf-hosting