My employers website has multiple hostnames that all hit the same server and we just show different skins for branding purposes.
Unfortunately WCF doesn’t seem to work well in this situation.
I’ve tried overriding the default host with a custom host factory.
That’s not an acceptable solution because it needs to work from all hosts, not just 1.
I’ve also looked at this blog post but either I couldn’t get it to work or it wasn’t meant to solve my problem.
The error I’m getting is ‘This collection already contains an address with scheme http’
There’s got to be a way to configure this, please help 🙂
If you don’t put an address in the endpoint then it should resolve to whatever server hits the service. I use this code and it resolves both to my .local address and to my .com address from IIS.