Home/ASP.NET Forums/Advanced ASP.NET/Active Directory and LDAP/Active Directory And Directory Information

Active Directory And Directory Information [Answered]RSS

4 replies

Last post Jun 16, 2008 05:32 PM by johram

Cheers!
  • worldclasscoders worldclassco...

    Participant

    1164 Points

    336 Posts

    Re: Active Directory And Directory Information

    Jun 13, 2008 01:20 AM|worldclasscoders|LINK

    You can use the following to determine what user the thread is executing with and without impersonate

    System.Security.Principal.WindowsIdentity.GetCurrent().Name

    Cheers!
  • on3 on3

    None

    0 Points

    2 Posts

    Re: Active Directory And Directory Information

    Jun 13, 2008 01:27 AM|on3|LINK

    Hi there,

    Thanks for replying back.
    During my webpart development, i found i need to impersonate the logged in user with another username in order to read "folder owner" in my file server. Quite contradicting, but anyway, the webpart itself will be used in a SharePoint environment. As far as i understand, SharePoint is also based on ASP.NET, thus putting the <identity impersonate =true userName="user" password="secret" /> will cause sharepoint to use the "user" identity instead of the logged in user. and this scenario is not what i expected.

    is there any way to "change" the web.config setting programmatically in asp.net?
    or other way which can help?

     Thanks in advance :)

     

     

  • johram johram

    All-Star

    16090 Points

    3547 Posts

    Re: Active Directory And Directory Information

    Jun 16, 2008 05:32 PM|johram|LINK

    See Ryan Dunn's post which will explain the basic security problems that you are likely to run into and how to solve them: http://forums.asp.net/t/897609.aspx

    If this post was useful to you, please mark it as answer. Thank you!
  • ‹ Previous Thread|Next Thread ›