See if user is part of Active Directory group in C# + Asp.net -


I have a way to see if a user is mine. Net 3.5 is part of an Active Directory group from asp.net c # applications. .

I am using MSDN's standard ldap authentication example but I do not really know how to check against the group.

with 3.5 and it is a bit cleaner:

  public list & Lt; String & gt; GetGroupNames (String Username) {var pc = New Principal Contex (ContaxTip.Deman); Var src = Userpanel. FidbiIndentity (PC, Username). Gate Group (PC); Var result = new list & lt; String & gt; (); Src.ToList () ForEach (sr = & gt; results.ad (sr.SamAccountName)); Return result; }  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -