我在Windows 7上使用IIS,并且无法绑定到0.0.0.0和127.0.0.1([::]和[:: 1])的IPv6等价物。
第一个尝试启动服务说,给了我一个错误
The World Wide Web Publishing Service (WWW Service) did not register the URL prefix http://[::]:80/ for site 1. The site has been disabled. The data field contains the error number.
第二个不会给出任何错误,但不会听取0.0.0.0以外的任何内容
绑定下拉列表只有我的teredo地址(2001::)列出,而不是我的本地链接(fe80 🙂 :)之一。
好的…由于某种原因,我需要使用netsh工具。
run netsh as an administrator http add iplisten ipaddress=::
这使得IIS能够监听IPv4和IPv6,而将IIS中的设置留在“所有接口”上进行监听。
这是我在我的机器上做的:
ipconfig Link-local IPv6 Address例如: fe80::198e:8552:7c6b:1902%10 fe80::198e:8552:7c6b:1902 ,如果您提供fe80::198e:8552:7c6b:1902%10 ,则会收到错误“ 值不在预期范围内”。 浏览网站,这将工作。 如果您希望通过支持IPv6的客户端通过networking访问它,请确保获得静态IPv6地址并为其创buildDNS条目。
applicationhost.config条目:
<bindings> <binding protocol="http" bindingInformation="[fe80::198e:8552:7c6b:1902]:80:" /> </bindings>