locked
Request.LogonUserIdentity RRS feed

  • Question

  • User1628746328 posted

    Is there a way to find out info on a  user using Request.LogonUserIdentity.Name?

     

    For example if a user is coming into my web application, can I retrieve first name, email address properties from this object?

     

    thanks..

     

    doug

    Monday, November 13, 2006 9:42 AM

All replies

  • User-1573490007 posted
    If you are using Membership for authentication, to get the stuff you want, try:

    MembershipUser myuser = Membership.GetUser(true);

    myuser then contains that information

    Monday, November 13, 2006 10:04 AM
  • User1628746328 posted

    i'll give that a shot...

     thanks!

     

    doug

    Monday, November 13, 2006 11:08 AM
  • User1628746328 posted

    MembershipUser doesn't seem to have a property exposed for name just email address.

     

     

    Monday, November 13, 2006 3:22 PM
  • User-1573490007 posted

    I just tried it:

    MembershipUser myuser = Membership.GetUser(true);

    Label1.Text = myuser.Username;

     

    it worked fine.

    Monday, November 13, 2006 4:30 PM
  • User-1573490007 posted
    Ahh wait. I reached this thread through the unanswered thread thing originaly, not looking at the board name, but thats why I wanted to confirm in one of my previous posts if you were using Membership...but you're not, you're using windows authentication, aren't you?
    Monday, November 13, 2006 4:34 PM
  • User1628746328 posted

    yes...

     windows authentication..

     

    thanks

    doug

    Monday, November 13, 2006 5:12 PM
  • User1628746328 posted

    so how do i do what i need to do using windows auth?

     

    thanks..

     

     

    Tuesday, November 14, 2006 11:29 AM
  • User-1573490007 posted

    Sorry, i'm not faliar with windows auth... but because I was mistaken and replied to your post, I have a feeling some people will think it is already resolved...

    Would the following do what you want?

    http://www.codeproject.com/useritems/How_to_NT_User_Name.asp

     

    Method 1 and 2 seems the most promising. 

    Tuesday, November 14, 2006 8:13 PM