English 中文(简体)
NET 3.5-系统. 名录服务 - 团体中的高级酋长院;
原标题:.NET 3.5 - System.DirectoryServices.AccountManagement - AdvancedSearchFilter on group?

I m using the System.DirectoryServices.AccountManagement API to pull a list of groups from AD. These groups all start with the same prefix so it s easy to find them using the prefix and a wildcard. What I d also like to do is just get the groups that have changed since I last checked. I ve subclassed GroupPrincipal to include the whenChanged attribute and I m using that currently, after I pull my full list of groups, to filter the list. What I d like to know is, is it possible to perform an AdvancedFilterSearch on a GroupPrincipal? I realize GroupPrincipal doesn t have an AdvancedFilterSearch property. I m wondering if you add one in a sub-class will PrincipalSearcher use it? If yes, an example would be nice.

Thanks,

Chris McKinnon

问题回答

仅让自上次检查以来发生变化的团体得到的简短答案是不可能(容易)的。

Every object in AD has an Update Sequence Number attribute associated with them. When a group changes its USN changes. BUT, not always. If you add/remove members to the group the USN does not change. It changes only when you change group name or other simple properties. On top of this, the USN number is unique on a single Domain Controller. So you have to make sure you always connect to the same server.

You can subscribe to changes to AD objects and get notified when they change, but this does not scale.

在我的项目中,我结束了对所有群体每次的询问。 这并不像它所健全那样糟糕,因为安普森在预想结果方面实在在是好的,而且它没有非常密集的资源。





相关问题
Test "User Must Change Password" field in .Net 3.5

I m trying to perform some basic AD User managment tasks in C# using .Net 3.5 I ve got a System.DirectoryServices.AccountManagement.UserPrincipal object that contains the user details. I can call ...

Entity Framework - Many to many question

I have a table called ASB and a table called PeopleInvolved. There is a junction table called PeopleInvolved_ASB which simply contains an ASBID and a PeopleInvolvedID column. The columns act as a ...

WCF: DuplexChannelFactory timeout error

I m using a DuplexChannelFactory when accessing my WCF service so that my service can use a callBackChannel to communicate back to the client. That s all fine but I get a timeout error when creating ...

AutoResetEvent, ManualResetEvent vs Monitor

Lets say I have to orchestrate a synchronization algorithm in .Net 3.5 SP1 and any of the synchronization primitives listed in the title fit perfectly for the task. From a performance perspective, is ...

Managing multiple .Net-Frameworks on a webserver

So I m in charge to deploy my project on the productive server where some other ASP.NET-Websites are also set up. The problem now is that I wrote my whole project under .NET 3.5 but on the webserver ...

Unit Testing .NET 3.5 projects using MStest in VS2010

There s a bug/feature in Visual Studio 2010 where you can t create a unit test project with the 2.0 CLR. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=483891&wa=...

热门标签