What is the difference between Request.UserHostAddress and Request.ServerVariables[“REMOTE_ADDR”]

While developing ASP.NET MVC website in C#, we usually need to track user IP address. While searching on google i have found following 2 things:

Request.UserHostAddress

and

Request.ServerVariables[“REMOTE_ADDR”]

What is the difference between these 2? What should i use?

Sana Beginner Programmer Asked on December 8, 2015 in C#.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.