How can I determine Client IP Address?

  • Thread starter Thread starter Cliff Cavin
  • Start date Start date
C

Cliff Cavin

Is there any quick and simple way to determine the IP Address of a client,
from withing and ASP.NET web page?

Thanks,,, Cliff
 
Try

HttpRequest.ServerVariables("REMOTE_ADDR")
--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 
Thank you Carlos.

I think what may also work very well is something like:

Dim UserIp As String

UserIp = Request.UserHostAddress

I don't know why it took me so long to find this. Just brain-lockup I
guess.

Basically what I was looking for was a way to easily determine if someone is
coming into the website from the Internet, or from behind the router. I am
pretty sure the snippett above will do that. But, I will keep these other
suggestions in mind as well.

Thanks again,,,, Cliff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top