1

how can I get the ip address of the IIS box where an asp.net application is running on? I tried:

 HttpContext.Current.Request.ServerVariables["SERVER_NAME"];

Is this at all possible?

Chris Schmich
  • 29,128
  • 5
  • 77
  • 94
user603007
  • 11,416
  • 39
  • 104
  • 168
  • Check if this [link](http://stackoverflow.com/questions/646525/getting-the-ip-address-of-server-in-asp-net) helps. – Nilesh Aug 05 '13 at 01:43

1 Answers1

0

Here are all the variables:

HttpContext.Current.Request.UserHostAddress; should work

Link 1

Prahalad Gaggar
  • 11,389
  • 16
  • 53
  • 71
Peter Kellner
  • 14,748
  • 25
  • 102
  • 188