我的部署環境在IIS 7.5託管的WCF服務前有SSL卸載(和負載平衡)硬件。因此,儘管外面的世界會去如何在WSDL中使用HTTPS卸載卸載後的WCF服務的服務端點
https://mydomain.com/MyService.svc
硬件將處理SSL,當我抓住從外面的WSDL(由套結上的流量轉發到
http://myintranet/MyService.svc
然而「?wsdl」),WSDL的地址是「http://mydomain.com/MyService.svc」 - 我公開地址的不安全,非SSL版本。
我試着明確地設置listenUri,但我得到一個錯誤,因爲我的站點還需要多個綁定(我內部可以通過SSL卸載訪問它,但通過負載平衡器,或繞過負載平衡器並達到網站()直接):
When 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' is set to true in configuration, the endpoints are required to specify a relative address. If you are specifying a relative listen URI on the endpoint, then the address can be absolute.
我試過baseAddresses,前綴過濾器,多個端點等的衆多組合,但始終與一個錯誤或其他結束。儘管我最好的谷歌搜索,我無法找到這個設置的其他人。
如果您有SSL的情況下卸載那麼它值得你考慮讓basicHttpBinding的作爲負載均衡器和Web服務器將自己的防火牆和安全的後面之間的流量。但是,如果您對用戶名密碼進行了認證,請考慮查看clearusernamebinding,以便您通過basichttpbinding傳輸用戶名passowrd:http://webservices20.blogspot.com/2008/11/introducing-wcf-clearusernamebinding.html – Rajesh 2012-02-24 11:20:19
@Rajesh ,我實際上已經使用了SSL卸載的替代策略(http://blog.hackedbrain.com/2006/09/26/how-to-ssl-passthrough-with-wcf-or-transportwithmessagecredential-over-plain- HTTP /)。但我仍然希望生成的WSDL包含HTTPS端點URI,而我的實際站點需要綁定到幾個非HTTPS名稱。 – Trinition 2012-02-29 19:30:26
您是否找到了解決方案? – svidgen 2012-11-05 16:03:06