查询Active Directory来获得在.NET用户的角色 [英] Query active directory to get a user's roles in .NET

查看:99
本文介绍了查询Active Directory来获得在.NET用户的角色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直使用的LINQ到Active Directory 的一点,但我发现很难得到所有角色,其中用户是一个成员的列表。我可以取回他们的直接组的列表,但它不是递归的。

I have been using Linq to Active Directory a bit but I am finding it difficult to get a list of all roles of which the user is a member. I can retrieve a list of their immediate groups but it isn't recursive.

究其原因,我想查询AD目录是为了解决内置的角色管理器AspNetWindowsTokenRoleProvider它不会让你叫Roles.GetRolesForUser(用户名),除非用户名匹配当前Windows标识。

The reason I am trying to query AD directory is to work around the built-in Role Manager AspNetWindowsTokenRoleProvider which won't let you call Roles.GetRolesForUser(username) unless the username matches the current Windows Identity.

推荐答案

你最近有没有看的这个

这篇关于查询Active Directory来获得在.NET用户的角色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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