Using VB.NET How can I retrieve the remote host IP Address?

I would like my intranet applcation to retrieve user ip addresses and store them in sql. What VB.NET code accomplishes the ip address retrieval?

Thanks

Paul G
pgilfeatherAsked:
Who is Participating?
 
Timbo87Commented:
Dim ip As String = Request.UserHostAddress
0
 
armoghanCommented:
pgilfeather needs in intranet invironment

If you are using TCP sockets
see these links
http://www.dotnet247.com/247reference/msgs/22/112905.aspx
http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21054119.html

see this link for converting any Hostname to IP address and vica versa
http://www.c-sharpcorner.com/Code/2002/April/IPAddHostConverter.asp
0
 
pgilfeatherAuthor Commented:
Timbo87,

Thanks. That was the correct answer and solved my problem with no messing about.

Cheers

Paul G
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.