0

I've to check that system has static or dynamic IP Address & then display ITs Dynamic address.I know how to find out static address.I want to know how to find out Dynamic IP address.....

Aristos
  • 66,005
  • 16
  • 114
  • 150
Rashmi Sargar
  • 61
  • 2
  • 8
  • 2
    You mean the dynamic ip address of the web site/web server ? You have your site behind an adsl router that change the ip - correct ? and search that ip and how you see you outside ? - Or you mean the ip of your viewers ? – Aristos Dec 01 '12 at 11:14
  • I want to find out IP of viewers – Rashmi Sargar Dec 01 '12 at 11:30

1 Answers1

1

The ip of the viewers are get from

Request.ServerVariables["REMOTE_ADDR"]

or

Request.UserHostAddress

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

If the user is behind a proxy you may also need to check some more server variables as I describe them on this answer: https://stackoverflow.com/a/2514717/159270

Community
  • 1
  • 1
Aristos
  • 66,005
  • 16
  • 114
  • 150