简体   繁体   English

集成Windows身份验证-注销

[英]Integrated Windows Authentication - Logout

I am attempting to use Integrated Windows Authentication on IIS for an MVC web app. 我正在尝试对MVC Web应用程序使用IIS上的集成Windows身份验证。 The original hope was that the user would be logged in automatically using the current Windows user credentials. 最初的希望是,该用户将使用当前的Windows用户凭据自动登录。 I am running into the issue where the user is always prompted to enter user name and password. 我遇到了总是提示用户输入用户名和密码的问题。 I have decided that we can live with this. 我已经决定我们可以接受这一点。 However, I have also noticed that the user can enter any valid domain credentials...it's not limited to the currently logged in machine. 但是,我还注意到用户可以输入任何有效的域凭据...它不仅限于当前登录的计算机。 But if this is the case, I need to provide a logout button, so the user can be switched if necessary. 但是,在这种情况下,我需要提供一个注销按钮,以便在必要时可以切换用户。

Everything I can find on this issue, logging out in Windows Authentication, says you cannot do it because it pulls the credentials from the machine login. 在Windows身份验证中注销后,在此问题上我能找到的所有信息都说您无法执行此操作,因为它会从计算机登录名中提取凭据。 But it's obviously not doing that in my case, because I can enter any valid credentials and log in successfully. 但是对于我来说显然不是这样做的,因为我可以输入任何有效的凭据并成功登录。 So a user could be logged onto the machine as user X, and then, when prompted, log into the web app as user Y. Am I to understand that, under Windows Authentication, there's no way to address this? 因此,用户可以以用户X的身份登录到计算机,然后在出现提示时以用户Y的身份登录Web应用程序。我是否了解在Windows身份验证下无法解决此问题?

Are you sure you selected Windows Authentication While creating the Project? 确定在创建项目时选择了Windows身份验证吗? Confirm that and if yes, proceed to check your web.config that application authentication is set to windows. 确认,如果是,请继续检查web.config,将应用程序身份验证设置为Windows。

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

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