How to get the IP address of the Client System ?

 Posted by Chvrsri on 12/27/2010 | Category: Networking Interview questions | Views: 3729 | Points: 40

By using following code in the Code-Behind file we can get the IP adderss of a client system on which the application is running.

string MyClientAddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];        

Response.Write("IP Address of my client system is ---"+MyClientAddress);

Source: My Own Observation | Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response