locked
DirectoryServices 2.0 and DirectoryEntry.new(...) RRS feed

  • Question

  • User-1020669906 posted

    If I do this:

    dim de as new DirectoryEntry("LDAP string", Nothing, Nothing)

    Will the constructor use the current user's credentials?

    I'm having an issue concerning the problem listed here: http://forums.asp.net/thread/1343670.aspx

    Monday, July 31, 2006 2:21 PM

All replies

  • User1354132231 posted
    Not necessarily.  It will have the current thread's credentials.  If that thread happens to be impersonating the client, then yes.  Otherwise, it will likely be the IIS or ASPNET worker process.

    The .Password property cannot tell you the current user's password.  Nothing can.


    Monday, July 31, 2006 6:51 PM
  • User-1020669906 posted
    I just overloaded the Password property to have a get.  Works fine.
    Tuesday, August 1, 2006 9:31 AM
  • User1354132231 posted
    Not necessarily.  It will have the current thread's credentials.  If that thread happens to be impersonating the client, then yes.  Otherwise, it will likely be the IIS or ASPNET worker process.

    The .Password property cannot tell you the current user's password.  Nothing can.



    To be clear for others reading this:  That only tells you the credentials you have supplied to the DirectoryEntry explicitly.  It in no way will tell you the password of the current security context that is set implicitly via impersonation or process account.
    Tuesday, August 1, 2006 2:59 PM