Problems accessing Active directory from asp page on different machine.

J

Jeremy Chapman

I built a page to view user ActiveDirectory object properties. On my
machine it works well, however when I moved the page to a different machine
I get exceptions being thrown when trying to view some of the properties,
such as middleName. The error is 'The directory datatype cannot be
converted to/from a native DS datatype'

The page is set to impersonate, and the app uses windows authentication.
System.Security.Principal.WindowsIdentity.GetCurrent().Name shows that the
user is in fact me. I even tried explicitely impersonating with this code
snippet:

pCurrentIdentity_m = System.Security.Principal.WindowsIdentity.GetCurrent();

pImpersonationContext_m = pCurrentIdentity_m.Impersonate();



Still I get the error?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top