如何使 WCF 服务托管在 IIS 6 中使用元数据中的主机名而不是 IP 地址?

发布于 2024-11-27 13:56:10 字数 101 浏览 8 评论 0原文

任何人都可以确认或否认可以在 IIS 6.0 上将 IP 地址设置为主机标头吗?

我在论坛上看到其他人声称已经完成了这项工作,但我没有得到“错误请求(无效主机名)”的回复。

Can anyone confirm or deny that it is possible to set an IP address as a host header on IIS 6.0?

I have seen others on forums that claim to have made this work however I am having no luck with a "Bad Request (Invalid Hostname)" for reply.

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

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

发布评论

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

评论(1

只想待在家 2024-12-04 13:56:10

我相信如果您的服务器有多个地址,您可以将一个网站分配给不同的 IP 地址。然而,看看我们的服务器,它分配给本地网络IP地址,而不是互联网IP地址。我认为您的要求不会发生,因为 IP 地址不是作为 HTTP 请求的一部分发送的。我认为它有效的唯一方法是,如果您的路由器/防火墙将不同的 IP 地址请求重定向到 Web 服务器上的不同端口,那么您可以将站点绑定到端口而不是主机标头。

I believe you can assign a website to different IP addresses, if your server has multiple addresses. However looking at our server, its assigned to the local network IP address, not the internet IP address. I don't think what your asking can happen since the IP address is not sent as part of the HTTP request. The only way I think it would work is if you have your router/firewall redirect different IP address requests to different ports on the web server, then you can bind your sites to the ports instead of the host header.

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