Show Computer name and IP of the computer viewing the web page
-
Hi ALL I like to Show Computer name and IP and host name of the computer viewing the intranet web page on the page. I am using aspx page with vb code behind. I can only see the server`s hostname, ip address and hostname. not the current pc`s :confused: Can someone help me PLEASE and can it be done?
-
Hi ALL I like to Show Computer name and IP and host name of the computer viewing the intranet web page on the page. I am using aspx page with vb code behind. I can only see the server`s hostname, ip address and hostname. not the current pc`s :confused: Can someone help me PLEASE and can it be done?
You get the user IP address from
Request.UserHostAddress
. As long as the compuer is in the same local network as the server, you can get the computer name usingSystem.Net.Dns.GetHostEntry(ip).HostName
.Despite everything, the person most likely to be fooling you next is yourself.
-
You get the user IP address from
Request.UserHostAddress
. As long as the compuer is in the same local network as the server, you can get the computer name usingSystem.Net.Dns.GetHostEntry(ip).HostName
.Despite everything, the person most likely to be fooling you next is yourself.
I tried that and it keep on giving me the server`s ip and host name. Is it maybe a permission setting? I have changed “authentication methods “to “integrated Windows authentication”. Still not working. I have also tried. :(( - My.Computer.name - System.Environment.machineName - Microsoft.VisualBasic.Interaction.Environ(“Computername”) No Luck
-
I tried that and it keep on giving me the server`s ip and host name. Is it maybe a permission setting? I have changed “authentication methods “to “integrated Windows authentication”. Still not working. I have also tried. :(( - My.Computer.name - System.Environment.machineName - Microsoft.VisualBasic.Interaction.Environ(“Computername”) No Luck
SAadmin wrote:
I have also tried. Cry - My.Computer.name - System.Environment.machineName - Microsoft.VisualBasic.Interaction.Environ(“Computername”) No Luck
No wonder. All those get the name of the server. What I showed you gets the ip address from the http header. If that would not be the ip of the client, the server would not be able to send the response back to the client.
Despite everything, the person most likely to be fooling you next is yourself.
-
SAadmin wrote:
I have also tried. Cry - My.Computer.name - System.Environment.machineName - Microsoft.VisualBasic.Interaction.Environ(“Computername”) No Luck
No wonder. All those get the name of the server. What I showed you gets the ip address from the http header. If that would not be the ip of the client, the server would not be able to send the response back to the client.
Despite everything, the person most likely to be fooling you next is yourself.