如何获取用户PC的IP地址? [英] How to get IP address of user's PC?
本文介绍了如何获取用户PC的IP地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
我正在开发一个基于网络的应用程序,我只想查找用户PC的IP地址(登录的人)在我的应用程序中)。任何人都可以建议我在Silverlight中支持任何功能来获取IP地址。
在此先感谢!!
Aarifa。
Dear All,
I am developing one web-based application in which I just want to find out IP Address of my user's PC(the one who logged-in My App). Can any one suggest me any function supported in Silverlight to get IP Address.
Thanks In Advance!!
Aarifa.
推荐答案
我希望这会对你有所帮助
i hope this will help you
protected string GetUser_IP()
{
string VisitorsIPAddr = string.Empty;
VisitorsIPAddr = Request.ServerVariables["REMOTE_ADDR"].ToString();
ureturn VisitorsIPAddr;
}
这篇关于如何获取用户PC的IP地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文