WCF WSDL Location Address with HTTPS

A common problem for WCF is how the hostname is resolved in wsdl to reference other files. The problem is that the computer name of the computer is placed in wsdl to link other wsdl files, so if you visit http: //myhost/service.svc , it may point to the rest of wsdl to another location, i.e. http: //mypc/service.svc? wsdl , which obviously is what you don't see from the outside.

There are several solutions for this already, this is common. Where you can customize the host header.

My question is how can I get around this by using an external IP address. I connect to the head office of clients from my website in order to receive data, it cannot be configured using dns, etc., but IP forwarding to the internal machine. Is there a way to get the machine to host WCF to represent the external address in wsdl files, and not in the machine name?

I use SSL to connect, which can make a difference (as in the host headers).

+6
networking hosting wcf
source share
2 answers

You need to set the host header for secureBingings website in IIS.

Here is an article on WCF WSDL and xsd: import a schemaLocations link to the local computer name not the domain name during deployment in IIS

+4
source

Yes, you can set the IP address as the host header. Just make sure that the external IP address is also recognized internally. I learned it with difficulty when in one of our projects we use ISA Server as a proxy.

If you have ever encountered this situation and you still insist on using the external IP address as the host header, then you can only specify the web service machine name in the hosts file.

0
source

All Articles