Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 28
  1. #1
    New Coder
    Join Date
    Jan 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to get client's username,computername,domain name using asp/javascript

    Hi All,
    Can any of you please tell me how to get client's username,computername,domain name using asp/javascript.we don't want to change any setting on IIS that is it will have anymonous access.I tried with server varaibles and Window script host.I don't want any client to install Activex,So can any please help regarding this.

    Thanks in advance,
    Looking forward for reply,

    Regards,
    Rashmi

  • #2
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts

    can't be done in asp

    built in security prevents this

  • #3
    New Coder
    Join Date
    Jan 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok,

    Can it be done in any other way using javascript or some other language?
    Can I just by any means get required information and pass it on to server?

    Regards,
    Rashmi

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,048
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Is this for intranet? I know an ASP component that can execute DOS commands from the server. You can execute a DOS command in the server where you can derive the PC name, username and domain of the user in the network.

  • #5
    New Coder
    Join Date
    Jan 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,
    Actually the site is internal use only,only employee of the company can access it,can you please given me more information on what you have said,some example will be very much appreciated or you can give the link of the article where can I found more about running dos comands from asp.


    Thanks and Regards,
    Rashmi

  • #6
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,048
    Thanks
    0
    Thanked 251 Times in 247 Posts

  • #7
    New Coder
    Join Date
    Jan 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok how can I get username,computername and domain using dos comands through aspExec asp component

    Thanks and Regards,
    Rashmi

  • #8
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,048
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Quote Originally Posted by Rashmir
    ok how can I get username,computername and domain using dos comands through aspExec asp component

    Thanks and Regards,
    Rashmi
    Execute nbtstat -a IPaddress and then from the output, you can parse the needed data. Try to execute that first in the DOS console to see what the output looks like.

  • #9
    New Coder
    Join Date
    Jan 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Even if I use this component it will execute on server computer right,I want client's username,clients computer name & clients domain name.

    is their no way I can get Client information?

    Thanks and Regards,
    Rashmi

  • #10
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,048
    Thanks
    0
    Thanked 251 Times in 247 Posts
    You specify the IP address of a remote machine in the network.

    nbtstat -a IPaddressOfRemoteMachine

    Try executing that in the DOS console and you will see the NetBIOS information of the remote machine.

  • #11
    New Coder
    Join Date
    Jan 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It displays all the list of user but how I will be able to figure out who had logged in,I want the current user name.

    Thanks and Regards
    Rashmi

  • #12
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,048
    Thanks
    0
    Thanked 251 Times in 247 Posts
    I know that's an awkward way of finding the user's machine information. Probably there's a better way of retrieving them.

    But let's deal with this...
    The list consists of username, domain and pc name. As you can see from the list, there is a Type column that says UNIQUE or GROUP. There is also a number like this <##>, e. g. <00>. Use those 2 data to determine the pattern that tells which of them are username, domain and pc name.

  • #13
    New Coder
    Join Date
    Jan 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am using Remote_addr servervariables to get the IP address,but its not diplaying the current IP address and moreover I am access the site through VPN access and I am getting still the server machine information instead of client information.Even I try with same domain it display all user with <##> but their r 3 to 4 entries with number so how I will be able to recongnize who as logged in

  • #14
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,048
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Can you post a sample output here? Of course, you need to change some sensitive data to bogus ones.

  • #15
    New Coder
    Join Date
    Jan 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The code I have written is as follows

    <html>
    <head><title>ASPExec Test (copy)</title><head>
    <body>
    <H3>ASPExec Copy Test</H3>

    <%
    Set Executor = Server.CreateObject("ASPExec.Execute")
    dim str
    str=request.ServerVariables("REMOTE_ADDr")
    str="-A " + str


    Executor.Application = "cmd /c nbtstat"
    Executor.Parameters = str
    strResult = Executor.ExecuteDosApp
    Response.Write "<pre>" & strResult & "</pre>"

    %>

    </body>
    </html>

    and the result output is as follows

    Local Area Connection:
    Node IpAddress: [16.105.79.104] Scope Id: []



    NetBIOS Remote Machine Name Table



    Name Type Status

    ---------------------------------------------

    CACCTSDEV02A <1F> UNIQUE Registered

    CACCTSDEV02A <00> UNIQUE Registered

    AMERICAS <00> GROUP Registered

    CACCTSDEV02A <03> UNIQUE Registered

    CACCTSDEV02A <20> UNIQUE Registered

    INet~Services <1C> GROUP Registered

    IS~CACCTSDEV02A<00> UNIQUE Registered



    MAC Address = 00-0B-CD-F2-98-81


    So as it is displaying domain names instead of local name,how can I figure out current user


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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