JavaScript: Find Currently Logged in User Name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dhanashivam
    New Member
    • Mar 2007
    • 31

    JavaScript: Find Currently Logged in User Name

    Hi all,

    I need to find the user name of the client which is supplied to the operating system (Windows OS) in my web application.

    Any one can say the way to find it? either by java script or .net? how to take it?

    i did the environment.nam e property by .net. but it returns the server machine's user name only. but i need the client machine's user name.

    Please help me.

    Thanks in Advance,

    Regards,
    Dhanasekaran
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    This is not possible with JavaScript. See, for example, this thread.

    Comment

    • dhanashivam
      New Member
      • Mar 2007
      • 31

      #3
      thanks for your reply.

      i did this by server side coding. Environment.Use rname.

      But this will work when the annonymous access is cleared in the IIS settings.

      otherwise this will not throw the currently logged-in user (Windows OS Username).

      Thanks.

      Regards,
      Dhana.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Glad to hear that you got it working.

        Comment

        Working...