简体   繁体   English

访问本地主机时 IIS 要求输入用户名和密码

[英]When accessing localhost IIS asks for username and password

I have installed IIS on Windows XP SP3 .我已经在Windows XP SP3上安装了 IIS。 When I want to access localhost from my browser the authentication window appears and asks for user name and password.当我想从浏览器访问 localhost 时,会出现身份验证窗口并要求输入用户名和密码。 Anonymous access is enabled for IUSR_ user and this user has full control permission on wwwroot folder.匿名访问已为IUSR_用户启用,该用户对wwwroot文件夹具有完全控制权限。 Any help is appreciated in advance.任何帮助都提前表示赞赏。

You've set your web site up to use Integrated Windows (NTLM) Authentication, which is supported by default in IE but not in Firefox.您已将您的网站设置为使用集成 Windows (NTLM) 身份验证,IE 默认支持,但 Firefox 不支持。 Firefox requires you to permit NTLM on a site-by-site basis. Firefox 要求您逐个站点地允许 NTLM。

This page explains how to enable NTLM and remove the login boxes in Firefox. 本页解释了如何在 Firefox 中启用 NTLM 和删除登录框。

Basically, you need to type about:config in the address bar and add the hostname to the list of comma-separated values on the network.automatic-ntlm-auth.trusted-uris setting.基本上,您需要在地址栏中键入about:config并将主机名添加到network.automatic-ntlm-auth.trusted-uris设置上的逗号分隔值列表中。

Let's say you have two sites that you want to enable NTLM authentication on: http://www.foo.com/ and http://www.bar.com/ .假设您有两个站点要启用 NTLM 身份验证: http://www.foo.com/http://www.bar.com/ You would need to set network.automatic-ntlm-auth.trusted-uris to www.foo.com, www.bar.com .您需要将network.automatic-ntlm-auth.trusted-uriswww.foo.com, www.bar.com

If you want your site to be accessible to anonymous users, you need to make sure that your IUSR_xxx account has at least read permission to the files that your web site is serving at the file system level.如果您希望匿名用户可以访问您的站点,则需要确保您的 IUSR_xxx 帐户至少对您的网站在文件系统级别提供的文件具有读取权限。 You can do this via Windows Explorer.您可以通过 Windows 资源管理器执行此操作。 I think you also need to grant list permission on the parent directories.我认为您还需要授予对父目录的列表权限。

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

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