Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

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
 
Share this answer
 
v2
Comments
vino2012 4-Oct-11 15:31pm    
I already saw this when i googled and used this. But it giving IP and not client computer name......
You can Try this, but this will work on Internet Explorer:

XML
<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 :)
 
Share this answer
 
Comments
vino2012 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900