views:

35

answers:

0

I have a WCF service that is load balanced on multiple boxes. We have setup host headers in IIS for the service website so that the host name, not the machine name, will show up in the WSDL (like this: http://forums.asp.net/p/1096811/1659596.aspx).

Now we have a requirement that an internal process needs to be able to hit a page on each server independently by IP. What is the best way to setup a WCF service in IIS so that the host name shows up in the WSDL, but you are still able to hit the website by an internal IP without getting an "Bad Request (Invalid Hostname)" error?

I do know that it is possible to publish a custom WSDL, which would technically solve this requirement, but I would really rather not have to mess with manually updating a WSDL with every change.

Thanks in advance.