0

My local IP address in 192.168.0.11. How can i get this using ASP.NET or Javascript.

Currently i am using the below which returns my Public IP Address

Dim ip As String = HttpContext.Current.Request.ServerVariables("REMOTE_ADDR") 

i googled many times but every method i got returns my Public IP.

Is it possible to get this info using asp.net or javascript.

2
  • 1
    You can't. JavaScript doesn't deal with IP's at all, and server-side languages really have no access to local IP's. Commented Jun 17, 2014 at 12:50
  • *Server-side JavaScript Commented Jun 17, 2014 at 13:04

1 Answer 1

1

You can't. Client-side JavaScript doesn't deal with IP's at all, and server-side languages really have no access to local IP's for the simple reason that this data is not being sent to the server.

If you really want to obtain the local IP, you're going to have to get the user to install some kind of software on their PC.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.