Last post Oct 03, 2013 11:51 PM by Steven Cheng - MSFT
Oct 02, 2013 12:31 PM|noobville|LINK
I am adding a .NET 4.5 WCF as a web reference to a .NET 2.0 assembly. The WCF is https and uses a DNS; so that when we migrate to different servers we won't have to worry about changing that portion. However, when I type in
https://Some_DNS_Name/MyWcf.svc the "Some_DNS_Name" gets converted to the server name in the config file, which we absolutely do not want. How can I get it to continue using the DNS?
Oct 02, 2013 09:40 PM|sukumarraju|LINK
web reference to a .NET 2.0 assembly
*Note that the service was created using v4.5, it is mandatory to add Service reference rather than
Legacy XML that are also called as ASMX service refernces added using Web Reference feature in visual studio.
Oct 03, 2013 11:51 PM|Steven Cheng - MSFT|LINK
I think the problem you encounter is probably due to the WCF service hosted in IIS server by default expose its private/local server name in the auto-generated WSDL metadata document. therefore, your generated service/web reference at client-side will pointing
to the private/local server address (based on the value in wsdl document).
If this is the case, to resolve the problem, we need to perform some configuration at the IIS server side. We need to configure the HTTP binding setting of the web site (in IIS) which host the WCF service and specify the public DNS address as its HTTP binding's