Hello sir,
can anyone help me
how to get client machine ip address in asp.net (visual studio 10) c# or vb.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rishikesh Kumar SinghPosted Jan 27, 2013, 8:51 AM
But if you want to know the ip address of the client machine then that you have to do this using the javascript and html because .html file is always processed by the browser on the client machine .
so, you make use of javascript to find out the ip address of the client machine.
you go through the link, here you will see how we can find the ip address using javascript. definitely your problem will be solved out.
http://www.aspdotnet-suresh.com/2013/01/javascript-get-user-details-ip-address.html#more
if it helps you then mark it as an accepted answer and otherwise let me know.
Rishikesh Kumar SinghPosted Jan 29, 2013, 12:31 AM
Vaibhav KanasePosted Jan 28, 2013, 10:06 AM
Finally my problem is solve.
Vaibhav KanasePosted Jan 21, 2013, 11:23 PM
Thanks for your time.
Rishikesh Kumar SinghPosted Jan 21, 2013, 7:49 AM
string ip = "";
string strHostName = "";
strHostName = System.Net.Dns.GetHostName();
IPHostEntry ipEntry = System.Net.Dns.GetHostEntry(strHostName);
IPAddress[] addr = ipEntry.AddressList; // this will give the address list
Try the above piece of code...It will definitely help you.If not then do contact me..