wcfiis-6wcf-bindinghostheaders

How to make a WCF Service hosted in IIS 6 Use the Host Name in Metadata instead of the IP Address?


Can anyone confirm or deny that it is possible to set an IP address as a host header on IIS 6.0?

I have seen others on forums that claim to have made this work however I am having no luck with a "Bad Request (Invalid Hostname)" for reply.


Solution

  • I believe you can assign a website to different IP addresses, if your server has multiple addresses. However looking at our server, its assigned to the local network IP address, not the internet IP address. I don't think what your asking can happen since the IP address is not sent as part of the HTTP request. The only way I think it would work is if you have your router/firewall redirect different IP address requests to different ports on the web server, then you can bind your sites to the ports instead of the host header.