Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

How to get user/client computer information

$
0
0

Hello all,

I have created a website and uploaded on the web server. I write a code on a particular page that get user/client  IP address, computer name and some of other details. When i run this page on a local server it work perfectly and give all my computer detail which i need. But when i upload this page on web server and access through url like (http://www.mysite.com/official.aspx) it give the web server computer detail, not an each user/client computer detail.

So my question is how can i get the user/client computer detail not the web server detail. My code is following:-

 

         Dim query As String = "SELECT * FROM Win32_NetworkAdapterConfiguration" + " WHERE IPEnabled = 'TRUE'"

        Dim moSearch As New ManagementObjectSearcher(query)

        Dim moCollection As ManagementObjectCollection = moSearch.[Get]()

 

           For Each mo As ManagementObject In moCollection

           Console.WriteLine("HostName = " + mo("DNSHostName"))

            Console.WriteLine("Description = " + mo("Description"))

            ABC += "HostName = " + mo("DNSHostName") + "</br>"

            ABC += "Description = " + mo("Description") + "</br>"

 

            Dim addresses As String() = DirectCast(mo("IPAddress"), String())

            For Each ipaddress As String In addresses

                Console.WriteLine("IPAddress = " + ipaddress)

                ABC += "IPAddress = " + ipaddress + "</br>"

            Next

            Dim subnets As String() = DirectCast(mo("IPSubnet"), String())

            For Each ipsubnet As String In subnets

                Console.WriteLine("IPSubnet = " + ipsubnet)

            Next

        Next

 


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>