生成的 WCF 代理配置使用服务器的本地名称

发布于 2024-07-25 21:44:57 字数 415 浏览 8 评论 0 原文

我们在防火墙后面托管了一项服务,该服务接收外部路由器转发给它的请求。 该服务工作正常,但是每当我们的客户之一使用 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北凤男飞 2024-08-01 21:44:57

我认为您有 3 个选择:

  1. 更改 IIS 中网站的配置以添加主机标头值“secure.myexternaldomain.com”。

  2. 在 WCF 配置的 元素中,指定服务的完整地址(即包括域)。

  3. 使用< baseAddresses> 配置元素。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文