Re: browsing AD with asp.net

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



What do you need from IADsUser that you can't get from the DirectoryEntry?
All the data is in the attributes if you know how to interpret it.

However, this does still suggest a security issue. Can you show me how the
constructor for DE that was used as the SearchRoot was done? If you are
using default credentials, then perhaps the current account in ASP.NET
doesn't have proper rights to AD?

Also, if you are using default credentials (not supplying username and
password), what is
System.Security.Principal.WindowsIdentity.GetCurrent().Name?

Joe K.

"cgian31" <cgian31@xxxxxxxxxxxx> wrote in message
news:1138264136.406133.44620@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Nope, sorry I still have problems:
>
> now it easily connects to AD and the
>
> SearchResultCollection results = searcher.FindAll();
>
> works pretty well.
>
> However, I need some details for the users and this statement fails:
>
> ActiveDs.IADsUser IADsDe= (ActiveDs.IADsUser) UE.NativeObject;
>
> I get the following COMexception:
>
> System.Runtime.InteropServices.COMException (0x80072020): An operations
> error occurred at System.DirectoryServices.DirectoryEntry.Bind(Boolean
> throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at
> System.DirectoryServices.DirectoryEntry.get_NativeObject()
>


.



Relevant Pages