c# - get ip address from client in server -
i using c# framework 4.0 windows form. program installed on server. there 4 light clients connect server.
when 1 of these clients launches progam, how can ip addreess , computer name
try this
using system; using system.collections.generic; using system.linq; using system.text; using system.net; //include namespace string hostname = dns.gethostname(); // retrive name of host console.writeline(hostname); // ip string myip = dns.gethostbyname(hostname).addresslist[0].tostring();
for more details visit please: http://www.c-sharpcorner.com/uploadfile/167ad2/get-ip-address-using-c-sharp-code/
thanks
Comments
Post a Comment