混合身份验证用于Windows身份验证 [英] Mixing Forms authentication with Windows authentication

查看:399
本文介绍了混合身份验证用于Windows身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有被设计为使用窗体身份验证(使用默认ASPNET会员制一起)的(ASP.NET 3.5)Intranet应用程序。我还存储有关这股与aspnet_Users表格内的主键的另一个表用户的其他信息。

I have an (ASP.NET 3.5) intranet application which has been designed to use forms authentication (along with the default aspnet membership system). I also store additional information about users in another table which shares its primary key with the aspnet_users table.

有关谁是我们的域的一部分,我店在二手表的用户他们的域帐户名,我要自动登录的用户的域帐户名相匹配的用户存储在表的名称。

For users who are part of our domain I store their domain account name in the secondary users table, and I want to automatically log in users whose domain account name matches a name stored in the table.

我已阅读对象有哪些指南 - 它们都是从两年前以上,假设你能够激活Windows身份验证一个单独的登录页面,允许你提取域帐户名上。从我可以告诉,虽然,这是不可能在IIS7(应用于整个验证方法上的所有页面,不能有选择地关闭,而两种身份验证方法不能在同一页面上应用)。

I have read the guides which are available - they're all from two years ago or more and assume that you are able to activate Windows Authentication on a separate login page that allows you to extract the domain account name. From what I can tell, though, this is not possible in IIS7 (the overall authentication method is applied on all pages and cannot be selectively deactivated, and both authentication methods can't be applied on the same page).

有没有让IIS通过请求用户的Windows域帐户名称的方式吗?我并不需要适当的AD认证,只是域名。

Is there a way of getting IIS to pass through the windows domain account name of the requesting user? I don't need proper AD authentication, just the domain name.

推荐答案

其实,你可以做到这一点。有点晚了@dr_draik,但这冒出了在谷歌的结果对我来说,所以我想我会分享一些知识。

Actually, you can do it. Bit late for @dr_draik, but this cropped up in a google result for me so I thought I'd share some knowledge.

如果您在经典模式是 - 启用Windows和窗体身份验证。你会得到一个有关无法同时做两个警告信息,但可以忽略它。然后,您可以spelunk各地的各种属性,如
code:

If you're in classic mode - Enable both Windows and Forms auth. You'll get a warning about not being able to do both at once, but you can ignore it. Then, you can spelunk around various properties like Code:

HttpContext.Current.Request.ServerVariables [LOGON_USER]

和鱼的用户名离开那里。

and fish the username out of there.

如果你在集成模式 - <一个href=\"http://stackoverflow.com/questions/4021905/iis7-challenge-based-and-login-redirect-based-authentication-cannot-be-used-simul\">4021905 IIS7挑战基和登录重定向基于认证,不能使用simultaneiously 的引出<一href=\"http://mvolo.com/iis-70-twolevel-authentication-with-forms-authentication-and-windows-authentication/\">IIS 7.0窗体身份验证和Windows身份验证双级身份验证这是一个模块,使您可以选择性地改变身份验证的不同的页面。

If you're in integrated mode - 4021905 IIS7 Challenge-based and login redirect-based authentication cannot be used simultaneiously leads to IIS 7.0 Two-Level Authentication with Forms Authentication and Windows Authentication which is a module that allows you to selectively change the auth for different pages.

这篇关于混合身份验证用于Windows身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆