Click here to Skip to main content
11,495,656 members (60,169 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: script
I am working as a asp.net developer for the last 1 year. Now i am need of Client information, exactly client computer name using client scripting. I googled for more than 3 hour for retrieving client computer name. Not able to fix exactly, so i need of some code guru's idea . . . . . . . .
Posted 4-Oct-11 9:21am
vino20121.4K
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

If you are willing to lowering your security options to a level of unacceptable here are some links that may help you:

Link 1[^]
Link 2[^]
In addition to this, another way is to do reverse IP lookup if this is a intranet machine.

Good luck
  Permalink  
v2
Comments
vino12345 at 4-Oct-11 15:31pm
   
I already saw this when i googled and used this. But it giving IP and not client computer name......
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You can Try this, but this will work on Internet Explorer:

<script type="text/javascript">
function GetComputerName()
{
    try
    {
        var network = new ActiveXObject('WScript.Network');
        // Show a pop up if it works
        alert(network.computerName);
    }
    catch (e) { }
}
</script>
<html>
<body onload="GetComputerName()"></body>
</html>


hope it helps Smile | :)
  Permalink  
Comments
vino12345 at 4-Oct-11 14:41pm
   
Hi friend, I tried this. It working well in IE but, if i host this file in my server it got not working in IE also...........

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Dnyaneshwar@Pune 692
1 CHill60 318
2 Sascha Lefèvre 275
3 Nakul Chaudhari 236
4 Sergey Alexandrovich Kryukov 230
0 Sergey Alexandrovich Kryukov 10,362
1 OriginalGriff 8,821
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600


Advertise | Privacy | Mobile
Web02 | 2.8.150520.1 | Last Updated 4 Oct 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100