Problems accessing Active directory from asp page on different machine.

Discussion in 'ASP .Net' started by Jeremy Chapman, Dec 1, 2003.

  1. 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?
     
    Jeremy Chapman, Dec 1, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. UJ
    Replies:
    2
    Views:
    423
  2. Toufani

    Accessing objects in active directory via asp.net

    Toufani, Aug 31, 2004, in forum: ASP .Net Security
    Replies:
    1
    Views:
    140
    Joe Kaplan \(MVP - ADSI\)
    Aug 31, 2004
  3. Jay Armstrong

    Active Directory Machine Account Permissions

    Jay Armstrong, Feb 28, 2005, in forum: ASP .Net Security
    Replies:
    4
    Views:
    412
    Jay Armstrong
    Mar 15, 2005
  4. hina awan via .NET 247

    accessing active directory using asp.net

    hina awan via .NET 247, Jun 1, 2005, in forum: ASP .Net Security
    Replies:
    0
    Views:
    125
    hina awan via .NET 247
    Jun 1, 2005
  5. Maqsood Ahmed [MCAD .NET]

    Problem in Accessing Active Directory from ASP.net

    Maqsood Ahmed [MCAD .NET], Jun 23, 2006, in forum: ASP .Net Security
    Replies:
    5
    Views:
    401
    Joe Kaplan \(MVP - ADSI\)
    Jun 27, 2006
Loading...

Share This Page