简体   繁体   English

无法使用本地Windows 7和IIS 7上的主机头访问网站

[英]Cannot access website using host headers on local windows 7 and iis 7

I have a problem accessing my website created using Visual Studio on my local pc. 访问本地计算机上使用Visual Studio创建的网站时遇到问题。

The pc is using Windows 7 and a static ip address has been configured. 电脑正在使用Windows 7,并且已配置了静态IP地址。 I have added a hostname "192.168.0.1 hosts myweb.mylocal.com" on c:\\windows\\system32\\driver\\etc. 我在c:\\ windows \\ system32 \\ driver \\ etc上添加了一个主机名“ 192.168.0.1 hosts myweb.mylocal.com”。

On IIS I have configured the binding myweb.mylocal.com with impersonation set enabled and windows authentication is enabled. 在IIS上,我已配置绑定myweb.mylocal.com并启用了模拟设置,并启用了Windows身份验证。

The user login just keeps prompting even though I have entered the correct username and password. 即使我输入了正确的用户名和密码,用户登录也会不断提示。

I know that on Windows Server 2003 since SP1, you cannot browse local sites set up for windows auth using host headers or FQDN. 我知道在Windows Server 2003 SP1以后的版本中,您无法使用主机头或FQDN浏览为Windows身份验证设置的本地站点。 This is by design to protect against reflection attacks. 这是设计使然,可防止反射攻击。 You can get round this with a couple of registry settings. 您可以通过几个注册表设置来解决这个问题。 See this article for more information. 有关更多信息,请参见本文。 http://support.microsoft.com/kb/896861 http://support.microsoft.com/kb/896861

I'm not sure if this is the case with Windows 7, but worth a try. 我不确定Windows 7是否会出现这种情况,但值得一试。

Alternatively you could just try browsing from another machine. 另外,您可以尝试从另一台计算机浏览。

John 约翰

Yea 192. . 是啊192。 .* is router reserved IP. 。*是路由器保留的IP。

I had the same issues with Windows 7 and and its due to IPV6. 由于IPV6,我在Windows 7上也遇到了相同的问题。

Try disabling the IPv6 Protocol in "Control Panel\\Network and Internet\\Network Connections" and right clicking your stablished connection to your router, unticking the IPv6 and leaving the IPv4 selected to see if that will make a difference.; 尝试在“控制面板\\网络和Internet \\网络连接”中禁用IPv6协议,然后右键单击与路由器建立的连接,取消选中IPv6,然后选择IPv4,以查看是否会有所作为。

Your local IP is more than likly :::1 or something along then lines! 您的本地IP远不止是::: 1之类的东西!

-- Update -更新

Where you have set you ip 192.168.0.1 to route to your local domain, try setting it to 127.0.0.1 so that it loops to itself and not via the gateway, Or you can leave it as it is and add the rule to your router to send traffic from the HTTP Port 80 to your PC. 在将ip 192.168.0.1设置为路由到您的本地域的地方,尝试将其设置为127.0.0.1,以便它循环而不是通过网关自身循环,或者您可以保留它并将规则添加到路由器将流量从HTTP端口80发送到您的PC。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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