views:

284

answers:

1

We have a service hosted behind our firewall that receives request forwarded through to it by the external router. The service is working fine, however whenever one of our clients adds a service reference using svcutil or Visual Studio, the generated app.config file always contains the endpoint address as https://myserver.myinternaldomain/... rather than https://secure.myexternaldomain.com/... which obviously isn't accessible to the outside world.

I've been playing with the config for ages now and I just can't get it to work, any ideas?

+2  A: 

I think you have 3 options:

  1. Change the config of your website in IIS to add a host header value of "secure.myexternaldomain.com".

  2. In your <endpoint> elements in your WCF configuration, specify the complete address of the service (i.e. including the domain).

  3. Use the <baseAddresses> configuration element.

Graham Clark
Number one solved it for us, thanks a lot!
Dave Rogers
Number one for me as well. I tried 2 and 3, but no joy. Thanks.
Forgotten Semicolon