我们在防火墙后面托管了一项服务,该服务接收外部路由器转发给它的请求。 该服务工作正常,但是每当我们的客户之一使用 svcutil 或 Visual Studio 添加服务引用时,生成的 app.config 文件始终包含端点地址 https://myserver.myinternaldomain/...而不是 https://secure .myexternaldomain.com/...显然外界无法访问。
我已经使用这个配置很长时间了,但我就是无法让它工作,有什么想法吗?
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?
发布评论
评论(1)
我认为您有 3 个选择:
更改 IIS 中网站的配置以添加主机标头值“secure.myexternaldomain.com”。
在 WCF 配置的
元素中,指定服务的完整地址(即包括域)。使用
< baseAddresses>
配置元素。I think you have 3 options:
Change the config of your website in IIS to add a host header value of "secure.myexternaldomain.com".
In your
<endpoint>
elements in your WCF configuration, specify the complete address of the service (i.e. including the domain).Use the
<baseAddresses>
configuration element.