Ajit
Ajit

Reputation: 53

Finding the IP Address of my system on asp.net page

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.

Upvotes: 1

Views: 1062

Answers (3)

Dennis Skantz
Dennis Skantz

Reputation: 373

You should be able to use:

Request.ServerVariables["LOCAL_ADDR"]

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

Upvotes: 0

Azhar
Azhar

Reputation: 20670

try this

how to get ip address of machine in c#

Upvotes: 0

Tim Li
Tim Li

Reputation: 215

Request.UserHostAddress. Try this.

Upvotes: 1

Related Questions