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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Timbo87Connect With a Mentor Commented:
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
All Courses

From novice to tech pro — start learning today.