简体   繁体   中英

How to make a WCF Service hosted in IIS 6 Use the Host Name in Metadata instead of the IP Address?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM