Reputation: 12962
What is the difference between Request.ServerVariables["REMOTE_ADDR"]
and Request.UserHostAddress
?
Are either of these variables considered unreliable with respect to IP Address spoofing?
Upvotes: 8
Views: 3456
Reputation: 1039418
They are the same, ServerVariables["REMOTE_ADDR"]
was provided only for backwards compatibility with older Classic Asp codebases. You should prefer using Request.UserHostAddress
.
Upvotes: 6
Reputation: 3156
The .ServerVariables is provided for compatibility with the old ASP method for getting that information. Most of the information provided through that is now provided through separate properties.
Upvotes: 7