Get the Client Machine IP address from ASP Web application

Sep 25 2017 2:52 AM
I have hosted the ASP.Net web application in the server Serv-A and its IP address is
I am browsing the above web application in the client machine Client-1 and its IP address is
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
The below codes are not working. Kindly let me know should i configure in the machines too?
  1. string IPAddress = Request.ServerVariables["REMOTE_ADDR"]  
  2. string IPadd2 = Request.UserHostAddress  

Answers (3)