Groups | Blog | Home
all groups > asp.net webcontrols > june 2003 >

asp.net webcontrols : how to get client computer name


haiwen
6/27/2003 12:18:19 PM
Hi, everyone,

Could anyone tell me how to get actual client computer
name in Server side(don't use client script). I use string
hostIP=Request.UserHostAddress;
and string computerName=Request.UserHostName;
but it seems both of them are the client's ip address.

Sincerely,

haiwen
haiwen
6/30/2003 8:59:18 AM
Khan Imran:

It works well, Thank you so much.

Best regards,

Haiwen

[quoted text, click to view]
Khan Imran
6/30/2003 8:12:32 PM
Try This it will work
{
String ClientIP = Request.UserHostAddress;
String
mName=""+System.Net.Dns.GetHostByAddress(ClientIP).HostName;
Response.Write(mName);
}
--
Regards
Khan Imran
[quoted text, click to view]

AddThis Social Bookmark Button