Ask a Question related to ASP.NET Security, Design and Development.
-
Patrick Olurotimi Ige #1
problem getting User Group Memebership in Active Directory
I have a .aspx page that gets USERS GROUPS from the Active Directory
after inputing the USERNAME of the user in a textbox.
And this has been working for me.
But now i get the error:-
"An Error occurred while getting group memberships
The referenced account is currently locked out and may not be logged on
to"
An ideas what is wrong?
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Patrick Olurotimi Ige Guest
-
Use CFLDAP to Add user onto Active Directory
How do you change a password? What I found out so far was that the password must be: - enclosed in quotes - converted to unicode then base64 -... -
problem accesing Active Directory from an ASP.NET App when user has been authenticated via AD certificate mapping
hello, I am developing an ASP.NET web application which interacts withAD. Client/User authentication must be done via AD certificatemapping, so I... -
Help me! How I could make user in active directory
The canonical sample is right here in the MSDN docs: ... -
User Authentication, Active Directory and more (help)
Hi, Can a .NET application make use of the information within the Active Directory in order to Authenticate and Authorize users? For example... -
Exporting users that below to a certain group - windows 2003 active directory
Is there any tool or script that will export the users names from a certain group from the active directory? I tried ldifde but it exports the cn... -
Joe Kaplan \(MVP - ADSI\) #2
Re: problem getting User Group Memebership in Active Directory
It sounds like the referenced account may be locked. If you can show a
short code sample that demonstrates this problem, that would be helpful.
Joe K.
"Patrick Olurotimi Ige" <naijacoder@hotmail.com> wrote in message
news:OSQAAUFVFHA.3312@TK2MSFTNGP09.phx.gbl...>I have a .aspx page that gets USERS GROUPS from the Active Directory
> after inputing the USERNAME of the user in a textbox.
>
> And this has been working for me.
> But now i get the error:-
>
> "An Error occurred while getting group memberships
> The referenced account is currently locked out and may not be logged on
> to"
>
> An ideas what is wrong?
>
>
>
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Joe Kaplan \(MVP - ADSI\) Guest
-
Patrick Olurotimi Ige #3
Re: problem getting User Group Memebership in Active Directory
Joe thanks for the reply but 'm getting the error when i try
retrieving the GroupMemberships.
Patrick
private string[] GetGroupMemberships(string path, ref int
primaryGroupID)
{
StringBuilder groupNames = new StringBuilder();
try
{
DirectoryEntry entry = new DirectoryEntry(path);
string[] properties = {"memberof", "primarygroupid"};
entry.RefreshCache(properties);
// invoke Groups method which will get all groups
// user is member of even primary group
object groups = entry.Invoke("Groups");
// the read group name from collection
foreach (object group in (IEnumerable)groups)
{
DirectoryEntry groupEntry = new DirectoryEntry(group);
groupNames.Append(groupEntry.Name);
groupNames.Append("|");
groupEntry.Dispose();
}
// set primary group id
primaryGroupID =
Convert.ToInt32(entry.Properties["primarygroupid"].Value);
entry.Dispose();
}
catch (Exception ex)
{
Response.Write("<font color=red>An Error occurred while
getting group memberships. " +
ex.Message + "</font>");
Response.End();
}
return groupNames.ToString().TrimEnd(new char[]{'|'}).Split(new
char[]{'|'});
}
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Patrick Olurotimi Ige Guest



Reply With Quote

