如何使 WCF 服务托管在 IIS 6 中使用元数据中的主机名而不是 IP 地址?
任何人都可以确认或否认可以在 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信如果您的服务器有多个地址,您可以将一个网站分配给不同的 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.