We have a WCF web service that is exposed through multiple bindings. The site is accessed through multiple IP Addresses/Hostnames (internet/intranet). Some of the bindings use
http transport while others use https transport.
The web application is configured to use .NET 4.0 with multipleSiteBindingsEnabled="true" so that we shouldn't have problems with multiple ip addresses/hostnames.
What we see is that when the WSDL is accessed using a http based URL (external), the hostnames in the endpoint addresses for http transport based bindings in WSDL are correct (ie, they use the hostname header from the request) while the hostnames in the
endpoint addresses for https transport based bindings in the WSDL are incorrect (ie,
they do not use the hostname header in the request - they seem to use the hostname from the first available binding in IIS for that scheme and end up with the local machine names/ip addresses in the URL).
We could work around by setting the external hostname/ip in the first binding in IIS for the respective scheme, but then WSDLs accessed from intranet clients would have wrong URLS now.
This happens the other way around as well, ie, when the WSDL is accessed using https, the https based addresses are fine, but http addresses in the WSDL are not correct.
It looks like hostname header is used only for WSDL endpoint addre
View Complete Post