在C#中获取服务器端客户端的ip地址 [英] getting ip address of client on server side in C#

查看:391
本文介绍了在C#中获取服务器端客户端的ip地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我是C#的新手.我正在做一个需要在服务器端使用客户端IP的项目.

Socket.RemoteEndPoint属性提供服务器IP而不是客户端IP.
请任何人帮助我.

Hi i m new in C#. and i am making a project in which i need client ip on server side.

Socket.RemoteEndPoint Property gives server ip instead of client.
plz anybody help me.

thanx in advance!

推荐答案

永远无法访问客户端的真实IP地址.您将看到的是Internet接入点的(NAT)地址.客户端IP地址位于专用网络上,因此在Internet上没有任何意义.
The real Ip Address of a client is never accessible. What you''ll see is the(NAT) address of the Internet access point. The client IP address is on a private network, so it has no meaning on the internet.


这篇关于在C#中获取服务器端客户端的ip地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆