来自 Web 服务器域外部的 IIS 7 和 Windows 身份验证

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7676956/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 18:12:34  来源:igfitidea点击:

IIS 7 and windows authentication from outside the web server's domain

windowsiisauthenticationdns

提问by blomster

I've deployed my site in IIS 7, and can browse to it fine on the web server. I've set it to windows authentication (only), and when browsing from outside the domain, I want to be challenged for credentials, and gain access when entering a domain\username & password combination that exists in the AD.

我已经在 IIS 7 中部署了我的站点,并且可以在 Web 服务器上浏览到它。我已将其设置为 Windows 身份验证(仅限),并且在从域外部浏览时,我希望接受凭据挑战,并在输入 AD 中存在的域\用户名和密码组合时获得访问权限。

401 - Unauthorized: Access is denied due to invalid credentials. My iis logs

401 - 未经授权:由于凭据无效,访问被拒绝。我的 iis 日志

I put a dummy site in IIS and set it to anonymous, I can browse to this no problem also.

我在 IIS 中放置了一个虚拟站点并将其设置为匿名,我也可以浏览到该站点,这也没有问题。

I checked that windows auth was installed/set up on the web server, and it is.

我检查了在 Web 服务器上安装/设置了 Windows 身份验证,确实如此。

What set of config parameters do I need to get this working?

我需要哪些配置参数才能使其正常工作?

*yes, I know I should use some sort of custom authentication provider with accounts stored in a database, but I don't want to go through that yet.

*是的,我知道我应该对存储在数据库中的帐户使用某种自定义身份验证提供程序,但我还不想经历那个。

Thanks for any advice, words of wisdom.

感谢您的任何建议,智慧之言。

采纳答案by Marco Miltenburg

I think your only option is to enable basic authentication. The user should then enter the full domain\username with the password. Beware though that basic authentication uses just base64 which can be very easily decoded. So if you enable basic authentication you have to use SSL/TLS as well.

我认为您唯一的选择是启用基本身份验证。然后用户应该输入完整的域\用户名和密码。请注意,基本身份验证仅使用可以很容易解码的 base64。因此,如果您启用基本身份验证,则还必须使用 SSL/TLS。

回答by Sacha

In Internet Explorer, you can get it to prompt you by: Internet Options > Security > Custom level > User authentication > Logon > Prompt for username and password.

在 Internet Explorer 中,您可以通过以下方式让它提示您:Internet 选项 > 安全 > 自定义级别 > 用户身份验证 > 登录 > 提示输入用户名和密码。