I have hosted the ASP.Net web application in the server Serv-A and its IP address is 192.168.1.1
I am browsing the above web application in the client machine Client-1 and its IP address is 175.30.1.1.
Here i need to capture my Client-1 machine's IP address whenever the applicaiton is accessing. I used the below codes, but i am not able capture the exact Client-1 machine IP address as 175.30.1.1
The below codes are not working. Kindly let me know should i configure in the machines too?
- string IPAddress = Request.ServerVariables["REMOTE_ADDR"]
- string IPadd2 = Request.UserHostAddress


Ankit SharmaRank #141 · 16.1K reputationPosted Sep 24, 2017, 11:46 PM EDT
Hariharan KrishnamoorthiRank #2,453 · 574 reputationPosted Sep 25, 2017, 2:38 AM EDT
Nilesh PatilRank #1,129 · 1.6K reputationPosted Sep 24, 2017, 11:08 PM EDT