我有一個網絡應用程序部署在互聯網託管服務提供商。此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