Re: How to get ou of an user
From: Jan Peter Stotz (jp_news_at_gmx.de)
Date: 05/27/05
- Previous message: Rajesh Kumar: "Re: find out if the user has enough rights to open a page"
- In reply to: dl: "Re: How to get ou of an user"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 27 May 2005 11:12:10 +0200
dl wrote:
> Thanks Jan. But what is returned by the GetDirectoryEntry().Parent.Path?
> can you give a sample format please?
The "DirectoryEntry.Path Property" is a String property. For a detailed
description search the .Net Framwork SDK Documentation.
VB.NET:
Dim searcher as new DirectorySearcher("LDAP://dc=yourdomain,dc=com")
searcher.Filter="(&(objectClass=user)(samaccountname=" & username & "))"
Dim result as SearchResult = searcher.FindOne
Dim userEntry as DirectoryEntry = result.GetDirectoryEntry()
Dim containerEntry as DirectoryEntry = userEntry.Parent
Dim String containerPath = containerEntry.Path
Jan
- Previous message: Rajesh Kumar: "Re: find out if the user has enough rights to open a page"
- In reply to: dl: "Re: How to get ou of an user"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|