Getting Logged in User Name

Discussion in 'ASP .Net' started by Ganesh Ramamurthy, Dec 8, 2004.

  1. Hi Experts,

    I am using windows integrated authentication in my ASP.Net application. I
    get a Windows Login dialog box and the user has to enter a username and
    password to access the pages. Once the user has logged in successfuly, I
    need to get the signed in userID and password (If possible.)

    Can I use
    System.Net.CredentialCache.DefaultCredentials.GetCredential().UserName; for
    this purpose. If so How is it possible to use that.

    Please advice if there is a better way of doing the same.

    Thankx in Advance

    Regards
    Ganesh
    Ganesh Ramamurthy, Dec 8, 2004
    #1
    1. Advertising

  2. Ganesh Ramamurthy,
    Since you are using Windows Auth u can get the logged on user
    by <%=User.Identity.Name%>.
    But you can't retrieve the Password!!
    Are u validating against Active Directory?
    Enjoy!
    Pstrick



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Patrick Olurotimi Ige, Dec 8, 2004
    #2
    1. Advertising

  3. Yes Pstrick. I am using Active Directory

    "Patrick Olurotimi Ige" <> wrote in message
    news:...
    > Ganesh Ramamurthy,
    > Since you are using Windows Auth u can get the logged on user
    > by <%=User.Identity.Name%>.
    > But you can't retrieve the Password!!
    > Are u validating against Active Directory?
    > Enjoy!
    > Pstrick
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Ganesh Ramamurthy, Dec 8, 2004
    #3
  4. Then that should work..
    Enjoy!
    Patrick

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Patrick Olurotimi Ige, Dec 8, 2004
    #4
    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. Chris Kettenbach

    return logged in user name

    Chris Kettenbach, Jul 22, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    15,403
    Peter Rilling
    Jul 22, 2005
  2. keithb
    Replies:
    0
    Views:
    620
    keithb
    Feb 16, 2006
  3. Replies:
    1
    Views:
    930
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Apr 12, 2007
  4. Imran Aziz

    Get the current logged in user name

    Imran Aziz, Aug 2, 2005, in forum: ASP .Net Security
    Replies:
    8
    Views:
    195
  5. Learner
    Replies:
    0
    Views:
    121
    Learner
    Mar 7, 2006
Loading...

Share This Page