Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF WSDL location address with HTTPS

A common issue for WCF appears to be how the hostname is resolved within the wsdl for the links to other files. The issue is that the machine name of the computer is placed into the wsdl to link the other wsdl files, so if you visit http://myhost/service.svc it may point to the rest of the wsdl on another location, ie http://mypc/service.svc?wsdl which obviously is something you cannot see externally.

There are a few solutions out there for this already, this being the common one. Where you can setup the host header.

  • http://jberke.blogspot.com/2008/06/wsdl-for-wcf-aspnet-service-uses-local.html

My question is, how can i work around this when using an external IP. I'm connecting to a clients head-office from their website to retrieve data, its not setup with a dns etc and the ip re-routes to a machine internally. Is there any way to force the machine hosting the WCF to present the external address in the wsdl files rather than the machine name?

I'm using SSL for the connection, which may make a difference (as with the host headers).

like image 888
dnolan Avatar asked Jan 14 '09 09:01

dnolan


1 Answers

You need to configure the host header for secureBingings of website within IIS.

Here is an article about WCF WSDL & xsd:import schemaLocations link to local machine name not domain name while hosted in IIS

like image 89
Ray Lu Avatar answered Oct 13 '22 12:10

Ray Lu