Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get the IP address of the client

Status
Not open for further replies.

fotinaki

Programmer
Jun 4, 2003
12
0
0
FR
I can't find the way to get the client's IP Address from the TcpClient...
If I din't use TcpClient, I could AcceptSocket() instead of AcceptTcpClient() to get the socket. When I had the socket I could use get_RemoteEndPoint()
but
I want to use TcpClient.
Actually, I'm trying to create a derived class from NetworkStream so that I have access to its protected Socket method and get the IP address...I want help or a better idea....Please.....

Thanks
 
I dont know if it apply to you, but if your building a web interface, you could use “Request.UserHostAddress”.

If you know the URL of the client, you could try
Dim hostInfo As IPHostEntry = Dns.GetHostByName("or
Dns.Resolve("
Hope it help;-)
Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top