Dave Rogers
Dave Rogers

Reputation: 135

Generated WCF proxy configuration uses server's local name

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?

Upvotes: 2

Views: 807

Answers (1)

Graham Clark
Graham Clark

Reputation: 12966

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.

Upvotes: 2

Related Questions