IIS7:像 IIS6 一样设置集成 Windows 身份验证

发布于 2024-07-11 20:07:48 字数 387 浏览 5 评论 0原文

这适用于不属于 AD 域的 Windows Server 2008 上的 IIS 7。 我想用密码保护一个网站,人们必须输入用户名/密码(例如 Windows 帐户)才能查看该网站。 然后,网站将使用自己的身份验证方法(表单)来处理用户帐户并决定是否显示会员特定页面等。

使用 IIS6,我们只需禁用匿名访问并启用集成 Windows 身份验证。 IIS7 的行为有所不同,当我输入 Windows 用户名/密码来查看站点时,该站点显示正常,但重定向到登录页面。 一旦我登录,该网站就会自然地运行。 我需要能够在不使用网站凭据登录的情况下浏览该网站。

我认为启用匿名访问在这里没有意义,因为我希望对网站的访问受到密码保护(首次导航到网址时弹出用户名/密码对话框)。

任何帮助表示赞赏!

This is for IIS 7 on a Windows Server 2008 that is not part of an AD domain. I would like to password protect a website, where people have to enter a username/password (a windows account for example) to view the website. The website would then use its own authentication method (forms) to handle user accounts and decide whether or not to show member specific pages, etc.

With IIS6, we just disabled anonymous access and enabled integrated windows authentication. IIS7 behaves differently and when I enter the windows username/password to view the site, the site comes up fine but redirects to the login page. Once I log in, the site behaves naturally. I need to be able to navigate the site without logging in with the website credentials.

I don't think enabling anonymous access would make sense here since I want access to the website to be password protected (popup username/password dialog when you first navigate to the url).

Any help is appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

美胚控场 2024-07-18 20:07:48

要在 Windows 7 计算机上的 IIS7 上启用 Windows 身份验证,请执行以下操作:

  • 转至控制面板

  • 单击程序>> 程序和功能

  • 从左侧选择“打开或关闭 Windows 功能”。

  • 拓展互联网信息服务>> 万维网服务>> 安全

  • 选择“Windows 身份验证”并单击“确定”。

  • 重置 IIS 并立即签入 IIS 以进行 Windows 身份验证。

享受

To enable the Windows Authentication on IIS7 on Windows 7 machine:

  • Go to Control Panel

  • Click Programs >> Programs and Features

  • Select "Turn Windows Features on or off" from left side.

  • Expand Internet Information Services >> World Wide Web Services >> Security

  • Select Windows Authentication and click OK.

  • Reset the IIS and Check in IIS now for windows authentication.

Enjoy

逆光下的微笑 2024-07-18 20:07:48

IIS7 集成模式不支持两阶段身份验证。 身份验证现在已模块化,因此不是 IIS 执行身份验证,然后 asp.net 执行身份验证,而是所有操作同时发生。

您可以:

  1. 将应用程序域更改为 IIS6 经典模式...
  2. 按照 此示例 (旧链接)介绍如何使用 IIS7 集成模式伪造两阶段身份验证。
  3. 使用 Helicon Apemod_auth 提供基本身份验证

Two-stage authentication is not supported with IIS7 Integrated mode. Authentication is now modularized, so rather than IIS performing authentication followed by asp.net performing authentication, it all happens at the same time.

You can either:

  1. Change the app domain to be in IIS6 classic mode...
  2. Follow this example (old link) of how to fake two-stage authentication with IIS7 integrated mode.
  3. Use Helicon Ape and mod_auth to provide basic authentication
年华零落成诗 2024-07-18 20:07:48

那么您是否希望他们获得 IE 密码挑战框,还是应该将他们引导至您的登录页面并在那里输入他们的信息? 如果是第二个选项,那么您至少应该启用对登录页面的匿名访问,因为该网站尚不知道他们是谁。

如果您想要第一个选项,那么他们转发到的登录页面将需要读取当前登录的用户并根据该用户进行操作,因为他们必须正确进行身份验证才能走到这一步。

So do you want them to get the IE password-challenge box, or should they be directed to your login page and enter their information there? If it's the second option, then you should at least enable Anonymous access to your login page, since the site won't know who they are yet.

If you want the first option, then the login page they're getting forwarded to will need to read the currently logged-in user and act based on that, since they would have had to correctly authenticate to get this far.

任谁 2024-07-18 20:07:48

Stack 上的其他地方有另一个主题类似的主题,我遇到的最佳解决方案是使用免费版本的 Helicon Ape

安装完成后,请按照标题为“HTTP 身份验证和授权”的页面中的步骤操作

There's another thread elsewhere on Stack with a similar topic and the best solution I've come across is to use the free version of Helicon Ape

Once you've got that installed, follow the steps at the page Titled "HTTP Authentication and Authorization"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文