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
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    In asp.NET I use:

    Code:
     
    Dim sLogOn As String = Request.ServerVariables("LOGON_USER")
    Does this help?

    Dr B

    Comment

    • dhanashivam
      New Member
      • Mar 2007
      • 31

      #3
      Thanks for your reply.

      But unfortunately i get null value by this statement.

      Again i explain you what i need is,

      I want to the Windows User Name which is supplied by the client machine. By that user name i will open my web application for that user.

      Please help me.

      Regards,
      Dhanasekaran. G

      Comment

      • srikanth reddy
        New Member
        • Feb 2008
        • 22

        #4
        Hai ............... .....




        pageload:--


        {



        HttpBrowser Capabilities bc=Request.Brow ser;

        lbl1.Text=" Ip Address :"+Request.User HostAddress;

        lbl2.Text= "Browser Name :" + bc.Browser;



        }


        Note:- take The Two Lables On Design Window

        Comment

        Working...