Results 1 to 3 of 3

Thread: username / nt login

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    Austin
    Posts
    397

    username / nt login

    how can i capture a nt ser name when a user enters a site?

  2. #2
    Hyperactive Member vbud's Avatar
    Join Date
    Jan 2002
    Location
    Mru 20 17S, 57 33E Goal: Get out of the BOX Status: In The Shadows!!! Target Posts: 3,000,000,000
    Posts
    378
    I've used this on Win2k but dont know if it will work on nt:
    VB Code:
    1. Dim objWinId As WindowsIdentity = WindowsIdentity.GetCurrent
    2.       Dim strUserName() As String = Split(objWinId.Name, "\")
    3.  
    4.       Dim sUsername As String = strUserName(1).ToUpper
    I guess you would need to reference "System.Security.Principal".
    >!v!<
    Free your mind, stop thinking
    http://inspirone.blogspot.com

    Please rate this post if it helped you

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Try something like HttpCurrent.User.Identity.Name

    I could be mistaken though, that is from memory.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width