7

How to get client ip address in asp.net.

andrew Sullivan
  • 3,944
  • 9
  • 31
  • 42

2 Answers2

7
HttpRequest.UserHostAddress 

http://msdn.microsoft.com/en-us/library/system.web.httprequest.userhostaddress.aspx

Raj Kaimal
  • 8,304
  • 27
  • 18
4

i used that in ASP.NET 3.5
string ip = Request.UserHostAddress();

Neil Knight
  • 47,437
  • 25
  • 129
  • 188
Govind Malviya
  • 13,627
  • 17
  • 68
  • 94