Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Using ASP.Net to Get User Information from AD

Reply
Thread Tools

Using ASP.Net to Get User Information from AD

 
 
Derek Martin
Guest
Posts: n/a
 
      04-20-2005
(Sorry, cross posted on accident)

Hey list, got this code running in a webform:

Dim DSESearcher As System.DirectoryServices.DirectorySearcher = New
System.DirectoryServices.DirectorySearcher
Dim RootDSE As String = DSESearcher.SearchRoot.Path
RootDSE = RootDSE.Insert(7, "ou=users,ou=myusers,")
Dim myDE As DirectoryEntry = New DirectoryEntry(RootDSE)
Dim myEntries As DirectoryEntries = myDE.Children
Dim thisentry As DirectoryEntry
thisentry = myEntries.Find("cn=" & lastname)
Label1.Text = thisentry.Name

Obviously, this won't work because it's running as the ASP.Net user. How do
I go about getting another or hardcoded user to authenticate with
DSESearcher?

Thanks!
Derek


 
Reply With Quote
 
 
 
 
billmiami2@netscape.net
Guest
Posts: n/a
 
      04-20-2005
Try

Dim myDE As DirectoryEntry = New DirectoryEntry(strLDAPPath,
strUserName, strPassword,
System.DirectoryServices.AuthenticationTypes.Secur e)

Bill E.
Hollywood, FL

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hi I have one web application and i want to get the number of users who are currently accessing the application. Also I want to get the user details of each user, which is stored in a database. How can I do this? Pls help. Getting No: and anu Java 11 05-12-2005 03:25 PM
strange information from asp.net trace / getting performance information using WebRequest and StreamReader z. f. ASP .Net 0 02-03-2005 11:23 AM
get current user information =?Utf-8?B?QmFydA==?= ASP .Net 3 11-26-2004 10:00 AM
How to get all information about user from DC vaidas gudas ASP .Net 3 07-28-2004 02:14 PM
Get user information Steven K ASP .Net 2 07-06-2004 10:36 PM



Advertisments