I have endpoints defined in a configuration file with a "fake" domain name. The idea is that this will simplify the deployment, because instead of changing the configuration files, we simply set the ip address of the โfakeโ domain name in the host files of the environment. So for example, in my local dev block, I will have an entry in the hosts file
127.0.0.1 fake.domain
and in a user adoption environment I could
192.45.34.31 fake.domain
but in my configuration file I would just have an endpoint
<endpoint address="http://fake.domain/someServiceBase/SomeService.svc" ... />
However, WCF seems to completely ignore the hosts file. I can copy the past address to the browser and it will work correctly, but the WCF client (which is located in the local dev block) will give a "host not found" error.
Why is WCF ignoring the hosts file?
Edit:
, , , IP- , .
<endpoint address="http://127.0.0.1/someServiceBase/SomeService.svc" ... />