how to get client computer name

H

haiwen

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
 
K

Khan Imran

Try This it will work
{
String ClientIP = Request.UserHostAddress;
String
mName=""+System.Net.Dns.GetHostByAddress(ClientIP).HostName;
Response.Write(mName);
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top