Tim,
  If you are using Windows Authentication then you need to set <identity
impersonate="true" /> in your web config file.  This will cause your
application to submit the user's credentials (username and password)
with your Directory Entry Object.

John

-----Original Message-----
From: Sapp, Tim [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 07, 2003 10:31 AM
To: dotnet
Subject: System.DirectoryServices




Anyone work with System.DirectoryServices?

I have a web site that I wrote for creating users from an internal web
site. I wrote is using ASP and ADSI. I am re-writing it using ASP.Net
and importing the System.DirectoryServices interfaces.  When I use the
following line I connect with no problems....

   DIM DE as DirectoryEntry
   Dim DomainPath as String =
"LDAP://Domain/OU=Test_Tsapp,DC=Domain,DC=PVT";
   Dim DirEntry As New DirectoryEntry(DomainPath, UserID, Password)

When I remove anonymous from the site and set it up with integrated
security it fails when I try and connect without the userID and
password.

   Dim DirEntry As New DirectoryEntry(DomainPath) 

According to the MSDN I should be able to connect but I keep getting
errors. There are no errors on the connection, just when I try and list
the contents of the OU.

   For Each DE In DirEntry.Children
      temp.Text = temp.Text & DE.Name
   Next



Anyone work with DS enough to give me some pointers?



Tim Sapp






---
You are currently subscribed to dotnet as: [EMAIL PROTECTED] To
unsubscribe send a blank email to
%%email.unsub%%

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search Subscription
Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/



The content contained in this electronic message is not intended to
constitute formation of a contract binding TWTC.  TWTC will be
contractually bound only upon execution, by an authorized officer, of
a contract including agreed terms and conditions or by express
application of its tariffs.

This message is intended only for the use of the individual or entity
to which it is addressed. If the reader of this message is not the
intended recipient, or the employee or agent responsible for
delivering the message to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to
the sender of this E-Mail or by telephone.

---
You are currently subscribed to dotnet as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/


Reply via email to