adobe71
0
Junior Poster in Training
Recommended Answers
Jump to PostHttpContext.Current.Request.UserHostAddress
This doesn't attempt to take into account proxies. For that, you can use Request.ServerVariables["HTTP_X_FORWARDED_FOR"]. However, make sure you're not trusting that blindly, since it could be forged. It's better to keep a whitelist of IPs for which you trust it.
Other example:
String strHostName …
All 4 Replies
Mitja Bonca
557
Nearly a Posting Maven
Mitja Bonca
557
Nearly a Posting Maven
sabithaespl
0
Newbie Poster
aspproject
-9
Junior Poster in Training
Banned
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.