1

I need my system IP address. I've used Request.ServerVariables["remote_addr"] but it is being provided IP address of my network(intranet) not my local system ip.

Actually I've set session state off and want to identify the user request. So i want to fetch the system IP not router/network IP. Please tell me the appropriate solutions.

Azhar
  • 20,500
  • 38
  • 146
  • 211
Ajit
  • 53
  • 2
  • 11

3 Answers3

1

Request.UserHostAddress. Try this.

Tim Li
  • 215
  • 1
  • 2
  • 8
  • This property provide the IP address of my router. I want to identify systems in network individually. – Ajit Aug 31 '10 at 06:49
  • Do you want to get the computer's name? what about trying this? Request.LogonUserIdentity.Name – Tim Li Sep 01 '10 at 01:31
0

try this

how to get ip address of machine in c#

Community
  • 1
  • 1
Azhar
  • 20,500
  • 38
  • 146
  • 211
0

You should be able to use:

Request.ServerVariables["LOCAL_ADDR"]

As seen on: http://msdn.microsoft.com/en-us/library/ms524602(VS.90).aspx

Dennis Skantz
  • 363
  • 2
  • 8