我有一个网络应用程序部署在互联网托管服务提供商。此Web应用程序使用部署在位于我公司的应用程序服务器上的IIS服务器上的WCF服务,为了能够访问公司的数据库,网络人员允许我出于安全原因通过防火墙公开此WCF服务。图表看起来像这样。WCF wsHttpBinding通过防火墙有趣的问题
[Hosted page] ---> (Internet) ---> |Firewall
<Public IP>:<Port-X >
| ---> [IIS with WCF Service<Comp. Network Ip>:<Port-Y>
]
我也想用wsHttpBinding来利用它的安全特性,并加密合理的信息。
想出来后我收到以下错误:
Exception Details: System.ServiceModel.EndpointNotFoundException: The message with To 'http://:/service/WCFService.svc' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree.
做一些研究,我发现,的wsHttpBinding使用WS-Addressing标准,和阅读关于这个标准我了解到,SOAP头增强,包括'MessageID','ReplyTo','Action'和'To'等标签。
所以我猜测,因为客户端应用程序端点指定了防火墙的IP地址和端口,并且服务回复的内部网络地址与防火墙的IP不同,那么WS-Addressing会触发上述消息。我认为这是一个非常好的安全措施,但在我的情况下它并不是很有用。
引述的WS-Addressing标准提交(http://www.w3.org/Submission/ws-addressing/)
"Due to the range of network technologies currently in wide-spread use (e.g., NAT, DHCP, firewalls), many deployments cannot assign a meaningful global URI to a given endpoint. To allow these ‘anonymous’ endpoints to initiate message exchange patterns and receive replies, WS-Addressing defines the following well-known URI for use by endpoints that cannot have a stable, resolvable URI. http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous "
我如何配置我的wsHttpBinding终点,以解决我的防火墙的IP,而忽略或绕过的 'To' 中指定的地址的WS-Addressing SOAP消息头中的标签?或者我必须改变我的服务端点配置中的某些内容?
帮助和指导将不胜感激。
Marko。
P.S .:虽然我发现任何解决方案,我使用basicHttpBinding当然没有问题。
+1 - 但是,我仍不清楚这将如何在部署到负载均衡器后面的多个服务器上运行。我已经通过这个伟大的职位已经http://www.devproconnections.com/article/net-framework2/wcf-and-ssl-processing-load-balancers-122238 – VoodooChild 2012-12-11 16:59:02