Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving the client's computer name

Status
Not open for further replies.

KingRichard3

Programmer
Feb 9, 2005
58
US
In development (running off my PC) I was able to use this:
Code:
Dim strComputerName as String = System.Net.Dns.GetHostByAddress(Request.ServerVariables("Remote_Host")).HostName
in order to retrieve the client's computer name. It worked just fine when I was using my PC as the server and a co-worker's computer as the client, I could capture their (the co-worker's) computer's name.

But now I've deployed it onto a webserver - on the same network as my computer and that of my co-worker's - and now it doesn't work, anymore.

What do I need to do to get this code to work again?

Thanks!
Rick
 
I got it - this is the right code to use:
Code:
System.Net.Dns.GetHostByAddress(Request.UserHostAddress).HostName()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top