Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
by request.userhostaddress can not get the ip address of client machine
it gives me some default address
Posted

1 solution

I'm going to make a wild stab in the dark here:

You are just runnning the application up in Visual Studio (or the client and server are on the same machine), the IP you are getting is 127.0.0.1? If som, this is correct, you need to test across two machines.

One further option is that the client machine is coming from behind a coporate firewall/ NAT proxy / VPN. If that is the case then it you will probably get a single IP for the whole network. See: http://forums.asp.net/t/1053767.aspx[^] for a fuller explanation and more details.
 
Share this answer
 
Comments
Sharma Richa 1-Aug-12 9:17am    
+5
I have same problem. see my question on
http://www.codeproject.com/Questions/432680/Problem-in-getting-IP-Address-of-client-machine

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900